During sleep, the body goes through stages of both non-REM and REM (rapid eye movement) sleep. REM sleep is associated with dreams and is a critical component of the sleep cycle; it occurs for roughly 90 minutes to two hours each night. During typical REM sleep, the muscles are temporarily paralyzed while the brain is actively dreaming. In some cases, the chemical that causes the body to remain still and the brain to remain active does not function properly; as a result, certain sleep disorders can develop, such as sleepwalking, narcolepsy or RBD. In RBD, muscles are not temporarily paralyzed like they should be, which allows the person to react to their dreams.