Interested in learning more about REM sleep? LiveScience has an explainer.

For more than 60 years, sleep researchers have known that there are two major categories of sleep: REM sleep, which stands for “rapid eye movement,” and non-REM or non-rapid eye movement sleep, said Dr. Stuart Quan, clinical director of the division of sleep and circadian disorders at Brigham and Women’s Hospital in Boston.

Non-REM sleep is now considered to consist of three stages, known as N1, N2 and N3, Quan said. Before 2007, non-REM sleep was broken down into four stages, but then sleep medicine specialists decided that there was no physiological reason to distinguish between two of the stages, the old stage 3 and stage 4 sleep, he explained. Those were combined into one stage, now referred to as N3.

During sleep, the brain repeatedly cycles through four distinct stages of REM and non-REM sleep in a specific sequence. This sequence changes somewhat between the first and second half of sleep. As sleep progresses in a series of four to five sleep cycles throughout the night, the time spent in the REM stage gets longer and the time spent in N3 sleep gets shorter, Quan said.

Live Science asked Quan for a more detailed explanation of what happens in the body and brain during each of these four stages of sleep.