The sleep cycle has five stages and occurs several times a night. When the brain is in REM sleep the brain is in the last and fifth stage of the sleep cycle. During REM sleep your body is in the restorative stage of sleep and this is when the brain waves within the brain move from slow and even brain waves to faster irregular brain waves. In stages three and four the slower more even brain waves result in not being attuned to the environment and being harder to wake so that the sleeper can reach REM which is required to feel restored when the sleeper wakes up. While the brain becomes more active (rapid eye movement which indicate dreaming occurs) the other voluntary muscles of the body become relaxed and paralyzed which prevent the dreamer from harming themselves while they are dreaming.