اللَّهُ يَتَوَفَّى الْأَنْفُسَ حِينَ مَوْتِهَا وَالَّتِي لَمْ تَمُتْ فِي مَنَامِهَا
Allahu yatawffal-anfusa Hīna mawtihā wal-latī lam tamut fī manāmihā
Allah takes the souls at the time of their death, and those who have not died in their sleep.
(Sūratuz Zumar, No. 39, Āyat 42)
The human being goes through a weak form of death every time he sleeps. That reminder alone is enough for us to be cognizant of our mortality and the transience of this world. At the time of death, the soul departs from the body and is taken by God. This movement of the soul also takes place at the time of sleep, albeit in a weaker form. The soul’s connection to the body is at a minimum during sleep. It rejoins the body when the person wakes up, coming back for an appointed time. It is reported that the Holy Prophet (s) used to say upon awakening from sleep: al-Hamdu lillāhil-ladhī aHyānī ba‘da mā amātanī wa-ilayhin-nushūr (All Praise is for Allah who gave me life after death, and to Him is the return). Imam Muhammad al-Bāqir (a) has said: When you wake up from sleep say: All Praise is for Allah who has returned my soul so I Praise Him and worship Him.
Sleep has been described as a time for the body to get rid of the poisons it accumulates during the day. It has also been explained as necessary for the body to release its tiredness and rejuvenate itself. However these are physical explanations for the phenomena of sleep. Quran, in this verse, gives us the spiritual understanding of sleep. It is a time when the soul leaves the body and is only partially connected to it for that time. The body-soul connection is a metaphysical reality that is not easy to understand. Perhaps it will only be fully understood once we leave this world, when such truths will become clearer to us. The Holy Quran says: But now We have removed from you your veil, so your perception today is piercing (Qur’an 50:22).
When we sleep our consciousness fades and we are no longer in charge of our selves. Our bodily functions are maintained but our consciousness sublimates to a different level. The soul is held in a different alternate state. And He it is Who takes your souls at night (in sleep) (Sūratul an‘ām, Āyat 60). The soul is extended into a different realm of existence, a realm not familiar to the body. Every time we go to sleep, we experience a form of death, a reminder that one day it will be the real thing with no return to the world.
Sources: Āytaullāh Nāsir Makārim Shirazī (ed.), Tafsīr Namūne