Ibnul Qayyim mentions in his ‘Tuhfatul Mawdood bi Ahkaamil-Mawlood’ (Book on rulings pertaining to the newly born child) pgs. 427-428 [Dar Aalamul Fawaaid edtn.]:
CHAPTER: So when a person reaches the appointed time that was decreed for him, the messengers of his Lord The Most High come to him to transfer him from the finite worldly abode, to the infinite abode of the Hereafter.
So they sit from him at a distance as for as the eye can see.
Then the Angel in charge of taking the souls draws close and summons the soul.
So if it is a good, pure soul he says: “Come out, O fine soul, in the fine body! Come out, having good pleasure & glad tidings of rest and satisfaction, and of a Lord that is not angry.”
So the soul comes out his body just as a water drop flows from the mouth of a water skin.
Then when the angel takes the soul he barely receives it whereupon it is taken and shrouded in fragrance and a shroud from Paradise, then they (the Angels) pray upon it.
Then such a soul emits the most beautiful fragrance of musk found on the face of this earth.
Then it is taken, ascending to its first offering upon the fastest of accounting angels.
So they reach the first heaven, seeking permission for it, so the doors of the heavens are opened for it, and the angels of that heaven pray over it and accompany it to the second heaven, so the same is carried out, then the third, then the fourth, until it arrives at the Heaven that Allaah – Exalted and Most High – is above, then it greets its Lord with the greeting of Lordship:
((O Allaah, you are The Flawless One, and from You comes peace and security, Blessed are You, Possessor of Majesty and Honour.))
So if Allaah wills, He gives permission for it to prostate.
Then the seal of paradise is brought out for it, so the Lord the Most High says: “Place the record of this servant of mine amongst those inhabitants of the highest ranks in Paradise. Then return him to the Earth, for verily from it I created them and to it I will return them, and from it I will cause them to emerge again.”
Then his soul is returned to the earth. So it is washed, shrouded, carried, and prepared.
And the soul says: “Take me forward, take me forward.’’
Then when the body is placed into the shelf inside the grave, and his companions turn away from him, his soul enters with him & he hears their departing footsteps upon the earth walking away from him, so two angels come to test him; sitting him upright and asking him:
“Who is your Lord? What is your religion? And who is your Prophet?”
So he replies: My Lord is Allah, my religion is Islam and my Prophet is Muhammad (may Allaah’s peace and blessings be upon him), so they say you have spoken the truth, and they give him glad tidings.
These (answers) were what he lived by, died by, and will be resurrected upon.
Then his grave is widened for him as far as the eye can see.
And he has green, lush bedding.
There appears a young, handsome and perfumed man in front of him, saying: “Have glad tidings of that which will cause you happiness.” So he questions him; saying: “Who are you? For your face is a face that bears glad tidings.”
He replies: “I am your righteous action.”
Then a window will be opened for him to the Hellfire, and it will be said: “Look at that which Allaah averted you from.”
Then a window to Paradise will be opened for him, and it will be said: “Look at that which Allaah has prepared for you.”
So he will see the both of them…