There may not be a straight-forward answer to your question as of now. But feel the following information may be of use to your query.
Allan Hobson speculates that REM sleep may exist in the intrauterine life in the form of a "protoconscous state" that serve as a "virtual reality" setting for training the developing brain towards a waking conscious required after birth.
- Hobson JA (2009): REM sleep and dreaming: towards a theory of protoconsciousness. Nat Rev Neurosci 10: 803–813.
Moreover at infancy, sleep starts with REM sleep instead of NREM sleep. As the child starts to have greater interaction with the world, the typical NREM sleep onset sets in. In adult sleep, bulk of REM sleep occurs in the later half of the sleep. So REM sleep may be compensating for something that occurs during long hours of deep NREM sleep. Probably, the synaptic pruning and memory consolidation that are proposed to be part of slow wave sleep (Diekelmann S, Born J (2010): The memory function of sleep. Nat Rev Neurosci 11:114–126.) may need to replayed in a more interactive yet controlled environment like REM sleep before waking consciousness can ensue. This may also explain why people getting up immediately from deep NREM sleep show some 'cognitive haziness' unlike those from REM sleep. Therefore, REM sleep and its associated mentation as a system could be designed to activate aggression circuits and respond to threat (McNamara P, Barton RA, Nunn CL. Evolution of Sleep. Cambridge University Press, 2010.).
As described by a review on the phenomenon of excessive REM sleep among depression patients (Palagini Let al (2013): REM sleep dysregulation in depression: State of the art. Sleep Med Rev 17:377–390), we at NIMHANS (Bengaluru, India) have seen that schizophrenia patients also show more disrupted REM sleep after a long NREM sleep cycle. Such disrupted REM sleep may allow dream mentation (usually negative events from prior waking period) to get consolidated, and further worsen their behaviour. Thus unlike PTSD, REM sleep may be maladaptive and causing more harm in these chronic psychotic diseases.
One possibility is that when subject is in SWS there are lack of associative connections between cortical modules. Some are turn-off loaded with glucose, so each 90 to 120 minutes, there is an activation from reticularis pontis oralis area through PGO waves, that calibrates and detected the amount and duration of connectivity between cortex, for to awake with full connections, a precondition necessary for to have a full state of consciousness. That would explain the progressive duration of REM sleep episodes along each sleep night time episodes. See all the recent work of Tononi G, Cirelli C. in that direction, that could be called homoeostatic theory. Of course a circadian pacemaker is part of this mechanism.