The electrical activity in the parts of the brain that control emotion shoot through the roof during REM sleep. At the other extreme, the logical part of the brain is as quiet as a churchmouse. The dreaming stage of sleep is associated with activation of the limbic system (particularly the amygdala, part of the brain that regulates emotion) and the anterior part of the cingulate gyrus (part of the brain that serves as a bridge between the limbic system and neocortex, with roles in emotion and reward). Perhaps that’s why the dreams that we remember have such a heavily emotional feeling. One part of the brain whose electrical activity becomes suppressed during REM sleep is the dorsolateral prefrontal cortex (a part of the brain associated with executive functions such as rational decision-making).
The way I understand it. "Dreams" as we understand them only last a few seconds. As we have more than one each night our brain tries to piece them together and create something coherent.