A Sleep Theory: Is there evidence?

I have often thought that people maintain consciousness as they go from awake to sleep. That is, as they enter the alter state of consciousness, called sleep, that there is a continuance of memory. It is only when the person wakes up, or switches to the awake state, that he looses memory.
I theorize that it works the same way as when we die. We maintain a consciousness from the physical state to the Spirit state. That is, we are completely conscious of everything in the process of dying and our experience in the Spirit world. It is only when we are reborn that we forget our previous experience.
Perhaps sleep research has already answered this theory. I would like to hear if it has. What do you think? Can it be proved or disproved? Any suggestion for experiments to do it?