Is sleep similar to death?
Yes. In sleep our consciousness, that is the soul, withdraws, much as it does in death. The difference is that in sleep God lets the soul return again and again.
When we fall asleep, our consciousness sinks step by step into deeper levels. In the morning we no longer know what happened in the deepest stages of sleep. The soul is then so far from our waking awareness that we cannot bring anything back from there.
If this sinking went on without the soul returning, that would be death. Death is the state from which there is no return to this life. Sleep is therefore very similar to it, except that it is not final. The first verse above describes exactly this. God takes the souls in death and in sleep, keeps some and sends the others back.
God has created a finely ordered process for this. During the night the soul keeps returning to the edge of wakefulness. Sleep researchers know these phases because the eyes then move rapidly back and forth behind the eyelids. If you wake someone during such a phase, they will usually remember their dream. What happened in the deep phases, on the other hand, is hardly remembered.
This regular rhythm is no accident. It is ordered in such a way that it saves us every night from sinking away for good. So every awakening is a small gift of life. That is why the Holy Prophet Muhammad (saw), on waking, thanked God for bringing him back to life, as the hadith above shows.