A hypnogram is a graph of sleep stages across the night, with time on the horizontal axis and stage on the vertical axis. It is the standard way to see the architecture of sleep.
Sleep is divided into two broad categories. NREM (non-rapid-eye-movement) sleep has three stages of increasing depth. N1 is the brief transition from wakefulness into sleep, lasting only minutes, with slow drifting thoughts and easy arousal. N2 is the largest share of a normal night; it is defined by characteristic brain-wave features called sleep spindles and K-complexes, and it represents established, stable sleep. N3, also called slow-wave sleep or deep sleep, is dominated by high-amplitude slow oscillations; it is the stage from which it is hardest to wake someone, and it is concentrated in the first part of the night. REM (rapid-eye-movement) sleep is a distinct state with rapid eye movements, vivid dreaming, and brain activity that resembles wakefulness, while the body's muscles are largely paralyzed.
On the hypnogram, the night is not a single descent into deep sleep. It is a series of cycles, each lasting roughly 90 minutes, that move from lighter NREM through deeper NREM and then into REM. What changes across the night is the composition of those cycles. Early cycles contain a large block of N3 and only a short period of REM. As the night progresses, N3 shrinks and eventually disappears, while REM periods grow longer, so the final cycles before waking are REM-rich. This is why the last hour or two of sleep is disproportionately REM: cutting a night short by waking early removes mostly REM, whereas going to bed late removes mostly the early slow-wave sleep.