All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger. We ask Allaah to exalt his mention as well as that of his family and all his companions.
We have already explained in Fatwa 87733 that sleep is a kind of death, and that the soul goes wherever Allaah wishes; so please refer to it.
Some scholars stated that the soul of a sleeping person goes up until it reaches the seventh heaven where it prostrates to Allaah under the Throne and then it is returned back to its body in a very short time.
Allaah Knows best.