Memory consolidation — the process of stabilizing a newly formed memory and transferring relevant parts of it from the hippocampus toward more permanent cortical storage — happens substantially during sleep, particularly during slow-wave sleep and REM. Studies comparing groups that learn material and then sleep versus stay awake for an equivalent period consistently show better retention in the sleep group, even when neither group gets additional study time.
This has a very concrete practical implication that's easy to underweight: pulling an all-nighter to cram right before a test doesn't just cost you alertness the next day — it actively undermines the consolidation of what you crammed, because the sleep window where that information would have been stabilized never happened. Sleep isn't a passive break from learning; it's an active part of the learning process itself.
In one of the earliest controlled demonstrations of sleep's role in memory, Jenkins and Dallenbach had participants memorize lists of nonsense syllables and then tested their recall after equal intervals of either sleep or continued waking activity. Participants who slept during the interval retained substantially more than participants who stayed awake for the same length of time, even though the sleeping group got no additional study time at all — the only difference was what happened to their brain during the gap between learning and testing.