Sleep is fluctuation of the mind without any content.
In sleep, the mind does not cease its activities except that it is not directed outwards towards any object. During sleep the brain has become disconnected from the outside world but resume its connection with the citta providing continuity of experience once it awakes from sleep. So what allows this to happen and also reports to us whether we had a good night sleep or not? Consciousness itself. However, one must distinguish the state of deep sleep from Shunyata (Emptiness) and Samadhi. In both Shunyata and Samadhi, especially Nirbija Samadhi (absorption into Oneness with no seed or associative thought of any sort), fluctuation of the ‘mindstuff’ has totally arrested itself and the seer totally abides in himself/herself. A simple explanation would be that in deep sleep the mind has totally withdrawn from the world while in Shunyata and Samadhi which give rise to the Pure Undifferentiated State or Turya, consciousness itself has transcended the world.
In bed, both upon going to sleep at night and awakening in the morning become aware and witness the transition from wakefulness to sleep and from sleep to wakefulness.
Make it a regular habit to practice Yoga Nidra and daily So Hum Meditation both as a morning and evening/night Sadhana. Learn these techniques from a realized Guru or at the very least from an experienced teacher.