In 1865 Friedrich August Kekul woke up from a strange dream: he imagined a snake forming a circle and biting its own tail. Like many organic chemists of the time, Kekul had been working feverishly to describe the true chemical structure of benzene, a problem that continually eluded understanding. But Kekul’s dream of a snake swallowing its tail, so the story goes, helped him to accurately realize that benzene’s structure formed a ring. This insight paved the way for a new understanding of organic chemistry and earned Kekul a title of nobility in Germany.

Although most of us have not been ennobled, there is something undeniably familiar about Kekul’s problem-solving method. Whether deciding to go to a particular college, accept a challenging job offer or propose to a future spouse, “sleeping on it” seems to provide the clarity we need to piece together life’s puzzles. But how does slumber present us with answers?

The latest research suggests that while we are peacefully asleep our brain is busily processing the day’s information. It combs through recently formed memories, stabilizing, copying and filing them, so that they will be more useful the next day. A night of sleep can make memories resistant to interference from other information and allow us to recall them for use more effectively the next morning. And sleep not only strengthens memories, it also lets the brain sift through newly formed memories, possibly even identifying what is worth keeping and selectively maintaining or enhancing these aspects of a memory. When a picture contains both emotional and unemotional elements, sleep can save the important emotional parts and let the less relevant background drift away. It can analyze collections of memories to discover relations among them or identify the gist of a memory while the unnecessary details fade—perhaps even helping us find the meaning in what we have learned.

Not Merely Resting
If you find this news surprising, you are not alone. Until the mid-1950s, scientists generally assumed that the brain was shut down while we snoozed. Although German psychologist Hermann Ebbinghaus had evidence in 1885 that sleep protects simple memories from decay, for decades researchers attributed the effect to a passive protection against interference. We forget things, they argued, because all the new information coming in pushes out the existing memories. But because there is nothing coming in while we get shut-eye, we simply do not forget as much.

Then, in 1953, the late physiologists Eugene Aserinsky and Nathaniel Kleitman of the University of Chicago discovered the rich variations in brain activity during sleep, and scientists realized they had been missing something important. Aserinsky and Kleitman found that our sleep follows a 90-minute cycle, in and out of rapid-eye-movement (REM) sleep. During REM sleep, our brain waves—the oscillating electromagnetic signals that result from large-scale brain activity—look similar to those produced while we are awake. And in subsequent decades, the late Mircea Steriade of Laval University in Quebec and other neuroscientists discovered that individual collections of neurons were independently firing in between these REM phases, during periods known as slow-wave sleep, when large populations of brain cells fire synchronously in a steady rhythm of one to four beats each second. So it became clear that the sleeping brain was not merely “resting,” either in REM sleep or in slow-wave sleep. Sleep was doing something different. Something active.

Sleep to Remember
The turning point in our understanding of sleep and memory came in 1994 in a groundbreaking study. Neurobiologists Avi Karni, Dov Sagi and their colleagues at the Weizmann Institute of Science in Israel showed that when volunteers got a night of sleep, they improved at a task that involved rapidly discriminating between objects they saw—but only when they had had normal amounts of REM sleep. When the subjects were deprived of REM sleep, the improvement disappeared. The fact that performance actually rose overnight negated the idea of passive protection. Something had to be happening within the sleeping brain that altered the memories formed the day before. But Karni and Sagi described REM sleep as a permissive state—one that could allow changes to happen—rather than a necessary one. They proposed that such unconscious improvements could happen across the day or the night. What was important, they argued, was that improvements could only occur during part of the night, during REM.

It was not until one of us (Stickgold) revisited this question in 2000 that it became clear that sleep could, in fact, be necessary for this improvement to occur. Using the same rapid visual discrimination task, we found that only with more than six hours of sleep did people’s performance improve over the 24 hours following the learning session. And REM sleep was not the only important component: slow-wave sleep was equally crucial. In other words, sleep—in all its phases—does something to improve memory that being awake does not do.

To understand how that could be so, it helps to review a few memory basics. When we “encode” information in our brain, the newly minted memory is actually just beginning a long journey during which it will be stabilized, enhanced and qualitatively altered, until it bears only faint resemblance to its original form. Over the first few hours, a memory can become more stable, resistant to interference from competing memories. But over longer periods, the brain seems to decide what is important to remember and what is not—and a detailed memory evolves into something more like a story.

In 2006 we demonstrated the powerful ability of sleep to stabilize memories and provided further evidence against the myth that sleep only passively (and, therefore, transiently) protects memories from interference. We reasoned that if sleep merely provides a transient benefit for memory, then memories after sleep should be, once again, susceptible to interference. We first trained people to memorize pairs of words in an A-B pattern (for example, “blanket-window”) and then allowed some of the volunteers to sleep. Later they all learned pairs in an A-C pattern (“blanket-sneaker”), which were meant to interfere with their memories of the A-B pairs. As expected, the people who slept could remember more of the A-B pairs than people who had stayed awake could. And when we introduced interfering A-C pairs, it was even more apparent that those who slept had a stronger, more stable memory for the A-B sets. Sleep changed the memory, making it robust and more resistant to interference in the coming day.

But sleep’s effects on memory are not limited to stabilization. Over just the past few years, a number of studies have demonstrated the sophistication of the memory processing that happens during slumber. In fact, it appears that as we sleep, the brain might even be dissecting our memories and retaining only the most salient details. In one study we created a series of pictures that included either unpleasant or neutral objects on a neutral background and then had people view the pictures one after another. Twelve hours later we tested their memories for the objects and the backgrounds. The results were quite surprising. Whether the subjects had stayed awake or slept, the accuracy of their memories dropped by 10 percent for everything. Everything, that is, except for the memory of the emotionally evocative objects after night of sleep. Instead of deteriorating, memories for the emotional objects actually seemed to improve by a few percent overnight, showing about a 15 percent improvement relative to the deteriorating backgrounds. After a few more nights, one could imagine that little but the emotional objects would be left. We know this culling happens over time with real-life events, but now it appears that sleep may play a crucial role in this evolution of emotional memories.

Precisely how the brain strengthens and enhances memories remains largely a mystery, although we can make some educated guesses at the basic mechanism. We know that memories are created by altering the strengths of connections among hundreds, thousands or perhaps even millions of neurons, making certain patterns of activity more likely to recur. These patterns of activity, when reactivated, lead to the recall of a memory—whether that memory is where we left the car keys or a pair of words such as “blanket-window.” These changes in synaptic strength are thought to arise from a molecular process known as long-term potentiation, which strengthens the connections between pairs of neurons that fire at the same time. Thus, cells that fire together wire together, locking the pattern in place for future recall.

During sleep, the brain reactivates patterns of neural activity that it performed during the day, thus strengthening the memories by long-term potentiation. In 1994 neuroscientists Matthew Wilson and Bruce McNaughton, both then at the University of Arizona, showed this effect for the first time using rats fitted with implants that monitored their brain activity. They taught these rats to circle a track to find food, recording neuronal firing patterns from the rodents’ brains all the while. Cells in the hippocampus—a brain structure critical for spatial memory—created a map of the track, with different “place cells” firing as the rats traversed each region of the track [see “The Matrix in Your Head,” by James J. Knierim; Scientific American Mind, June/July 2007]. Place cells correspond so closely to exact physical locations that the researchers could monitor the rats’ progress around the track simply by watching which place cells were firing at any given time. And here is where it gets even more interesting: when Wilson and McNaughton continued to record from these place cells as the rats slept, they saw the cells continuing to fire in the same order—as if the rats were “practicing” running around the track in their sleep.

As this unconscious rehearsing strengthens memory, something more complex is happening as well—the brain may be selectively rehearsing the more difficult aspects of a task. For instance, Matthew P. Walker’s work at Harvard Medical School in 2005 demonstrated that when subjects learned to type complicated sequences such as 4-1-3-2-4 on a keyboard (much like learning a new piano score), sleeping between practice sessions led to faster and more coordinated finger movements. But on more careful examination, he found that people were not simply getting faster overall on this typing task. Instead each subject was getting faster on those particular keystroke sequences at which he or she was worst.

The brain accomplishes this improvement, at least in part, by moving the memory for these sequences overnight. Using functional magnetic resonance imaging, Walker showed that his subjects used different brain regions to control their typing after they had slept. The next day typing elicited more activity in the right primary motor cortex, medial prefrontal lobe, hippocampus and left cerebellum—places that would support faster and more precise key-press movements—and less activity in the parietal cortices, left insula, temporal pole and frontopolar region, areas whose suppression indicates reduced conscious and emotional effort. The entire memory got strengthened, but especially the parts that needed it most, and sleep was doing this work by using different parts of the brain than were used while learning the task.

Solutions in the Dark
These effects of sleep on memory are impressive. Adding to the excitement, recent discoveries show that sleep also facilitates the active analysis of new memories, enabling the brain to solve problems and infer new information. In 2007 one of us (Ellenbogen) showed that the brain learns while we are asleep. The study used a transitive inference task; for example, if Bill is older than Carol and Carol is older than Pierre, the laws of transitivity make it clear that Bill is older than Pierre. Making this inference requires stitching those two fragments of information together. People and animals tend to make these transitive inferences without much conscious thought, and the ability to do so serves as an enormously helpful cognitive skill: we discover new information (Bill is older than Pierre) without ever learning it directly.

The inference seems obvious in Bill and Pierre’s case, but in the experiment, we used abstract colored shapes that have no intuitive relation to one another, making the task more challenging. We taught people so-called premise pairs—they learned to choose, for example, the orange oval over the turquoise one, turquoise over green, green over paisley, and so on. The premise pairs imply a hierarchy—if orange is a better choice than turquoise and turquoise is preferred to green, then orange should win over green. But when we tested the subjects on these novel pairings 20 minutes after they learned the premise pairs, they had not yet discovered these hidden relations. They chose green just as often as they chose orange, performing no better than chance.

When we tested subjects 12 hours later on the same day, however, they made the correct choice 70 percent of the time. Simply allowing time to pass enabled the brain to calculate and learn these transitive inferences. And people who slept during the 12 hours performed significantly better, linking the most distant pairs (such as orange versus paisley) with 90 percent accuracy. So it seems the brain needs time after we learn information to process it, connecting the dots, so to speak—and sleep provides the maximum benefit.

In a 2004 study Ullrich Wagner and others in Jan Born’s laboratory at the University of Lbeck in Germany elegantly demonstrated just how powerful sleep’s processing of memories can be. They taught subjects how to solve a particular type of mathematical problem by using a long and tedious procedure and had them practice it about 100 times. The subjects were then sent away and told to come back 12 hours later, when they were instructed to try it another 200 times.

What the researchers had not told their subjects was that there is a much simpler way to solve these problems. The researchers could tell if and when subjects gained insight into this shortcut, because their speed would suddenly increase. Many of the subjects did, in fact, discover the trick during the second session. But when they got a night’s worth of sleep between the two sessions, they were more than two and a half times more likely to figure it out—59 percent of the subjects who slept found the trick, compared with only 23 percent of those who stayed awake between the sessions. Somehow the sleeping brain was solving this problem, without even knowing that there was a problem to solve.

The Need to Sleep
As exciting findings such as these come in more and more rapidly, we are becoming sure of one thing: while we sleep, our brain is anything but inactive. It is now clear that sleep can consolidate memories by enhancing and stabilizing them and by finding patterns within studied material even when we do not know that patterns might be there. It is also obvious that skimping on sleep stymies these crucial cognitive processes: some aspects of memory consolidation only happen with more than six hours of sleep. Miss a night, and the day’s memories might be compromised—an unsettling thought in our fast-paced, sleep-deprived society.

But the question remains: Why did we evolve in such a way that certain cognitive functions happen only while we are asleep? Would it not seem to make more sense to have these operations going on in the daytime? Part of the answer might be that the evolutionary pressures for sleep existed long before higher cognition—functions such as immune system regulation and efficient energy usage (for instance, hunt in the day and rest at night) are only two of the many reasons it makes sense to sleep on a planet that alternates between light and darkness. And because we already had evolutionary pressure to sleep, the theory goes, the brain evolved to use that time wisely by processing information from the previous day: acquire by day; process by night.

Or it might have been the other way around. Memory processing seems to be the only function of sleep that actually requires an organism to truly sleep—that is, to become unaware of its surroundings and stop processing incoming sensory signals. This unconscious cognition appears to demand the same brain resources used for processing incoming signals when awake. The brain, therefore, might have to shut off external inputs to get this job done. In contrast, although other functions such as immune system regulation might be more readily performed when an organism is inactive, there does not seem to be any reason why the organism would need to lose awareness. Thus, it may be these other functions that have been added to take advantage of the sleep that had already evolved for memory.

Many other questions remain about our nighttime cognition, however it might have evolved. Exactly how does the brain accomplish this memory processing? What are the chemical or molecular activities that account for these effects? These questions raise a larger issue about memory in general: What makes the brain remember certain pieces of information and forget others? We think the lesson here is that understanding sleep will ultimately help us to better understand memory.

The task might seem daunting, but these puzzles are the kind on which scientists thrive—and they can be answered. First, we will have to design and carry out more and more experiments, slowly teasing out answers. But equally important, we are going to have to sleep on it.

Note: This article was originally published with the title, "Quiet! Sleeping Brain at Work."