If you do not pay it much thought it is easy to assume that when you are asleep you're asleep, and that is all there is to it. If however you give it some thought you can easily deduce that this is not the case; some times you will get woken up an hour in and feel alert, where as on other occasions you will get woken up and feel groggy, which is normally the case when you get woken up whilst dreaming.
The reason for this is that sleep is not simply unconsciousness; it is a complex biological process in which the events of your day and the things you have learned are converted from short to long term memory, repairs to the body are carried out; and issues, whether conscious or subconscious, are dealt with. In fact it is due to this last point that when you are having trouble thinking of how to deal with a situation that you are told to sleep on it, as sleeping will allow you to approach the subject with a fresh perspective.
So much is done when we sleep that it makes sense that sleep should be compartmentalised, and become part of a cycle. The sleep cycle as it is understood consists of 4 stages of sleep, each one deeper than the last, and characterised by certain physiological traits which denote the sleeper's altered state of consciousness. Additionally, the deepness of one's sleep can be measured by the waves that the brain is creating, which can only be measured using electroencephalograph, which is better known as an EEG machine.
The 4 stages of sleep can be categorised as non-rapid eye movement (NREM) sleep, which consists of stages 1 to 3, and rapid eye movement (REM) sleep which consists of stage four. It is important to note that until recently the third stage of sleep was dived into 2 separate stages, making REM sleep stage 5; this is not incorrect, but it is deemed as overly complicated, and quite a pedantic way of splitting the stages up, as stage 3 was simply the transition between stage 2 & 4.
The cycle itself is regulated by the body via the production of a hormone called Melatonin, which is produced in the the pineal glad, which is located in the brain. Damage to the pineal gland is the reason that some people who have suffered head trauma will develop sleep disorders. When functioning normally however your body will produce melatonin, which causes you to feel tired, when it starts to get dark; which is why people feel tired early in the winter.
Stage 2 – Once stage 2 of sleep has been entered, eye movement will cease and consciously experiencing anything, including dreams, is highly unlikely; despite this, the sleeper is still easily awakened, and will retain a sense of alertness. This stage is when memories that have been stored in the brain's short term memory will be consolidated and transferred into long-term memories. Around half of the sleep we gain will be spent occupying this stage.
Stage 3 – In the final stage of NREM sleep the sleeper is considered to be in a deep sleep. This stage is characterised by the same happenings as stage 2, but the brain produces a different, slower wave, altering the way it perceives things, or rather what you perceive it as doing. The change in brain waves makes dreaming in this stage more common than in the previous stages; and is also responsible for the occurrence of other sleep phenomena, such as sleep taking, sleep walking and bed wetting. Interestingly, nightmares and night terrors are most likely to occur in this stage, and not in REM sleep, which is generally recognised as the stage in which the majority of dreaming takes place.
Stage 4 – Known commonly as REM sleep due to the seemingly random, darting movement of the sleepers eyes, this stage is also referred to as paradoxical sleep; due to the body being effectively paralysed, aside from the erratic eyes movements. The reason your body is immobilised is that by this stage of sleep your body's muscle tone and your brain's electrical impulses are lowered, to the point that motor control is all but impossible. If this were not to happen then some would argue that it is possible that any movement that you performed in a dream would be acted out; though this is not known for sure. This stillness further enforces the point that nightmares occur in NREM sleep, as the sleeper will often toss and turn throughout the unpleasant experience.
Going through all of these stages of sleep several times a night is imperative if you hope to achieve a healthy mind and body. REM sleep deprivation for instance is defined by a number of unpleasant symptoms including anxiety, visual & auditory hallucinations, increased aggression & irritability, impaired concentration and altered eating behaviours; none of which are conducive to a healthy lifestyle.