Sleeping on a problem: how dreams and REM produce creative answers

October 6, 2026 · 17 min read

Walker, Poe, Jandial and Rick Rubin describe sleep as a state in which the brain links distant ideas, which is why solutions and new ideas often appear after a night's sleep or on waking. It gives creative workers a reason to capture ideas on waking and to schedule hard problems before sleep.

Listen to this insight

The Short Version

Sleep does more than store what you learned. According to the sleep scientist Matthew Walker, it cross-links new memories with everything you already know and favors the distant, non-obvious connections a waking mind would not try [1]. In his lab, people woken from REM sleep solved anagrams about 30 percent better than people woken from non-REM sleep, and a night of sleep tripled the chance of finding a hidden shortcut in a number task [1]. Gina Poe describes the same linking from the middle of the night, the neurosurgeon Rahul Jandial describes it from the half-awake minutes at either end of sleep, and the record producer Rick Rubin has built his mornings around it [3][4][5]. Two conditions come with the good news. The insights follow hard waking work on the problem, and in at least one experiment only people who actually dreamed about the task got better at it [1][2]. So the practical advice is to load the problem before sleep, protect the whole night, wake slowly, and write things down before the day rushes in.

Table of contents

What They Said

Matthew Walker: REM sleep as informational alchemy

Walker, of UC Berkeley, sorts what sleep does for the mind into three jobs. Sleep before learning prepares the brain to take in new information. Sleep after learning saves it. The third job, the one that matters here, he calls informational alchemy: sleep blends new memories with each other and with your whole life's store of knowledge [1].

The blending has a bias. It favors distant, non-obvious associations. Walker's image is a search engine. Awake, your brain returns the first page of results. In dreams it jumps to page 20, or in another telling page 35, which looks unrelated at first and can hold a clever connection [1][2]. In the transcript he describes the kind of link he means as "Very distant, very non-obvious," a connection he says his waking brain would never have put together [2].

He gives two experiments. In the first, his lab woke people from different stages of sleep and gave them anagrams. People woken from REM sleep solved them about 30 percent better than when woken from non-REM sleep, and in a more fluid way, with answers seeming to pop out [1]. The second used the Number Reduction Task, which can be ground through step by step but contains a hidden shortcut. A night of sleep produced a threefold increase in discovering the hidden rule, compared with staying awake for the same length of time, whether that time was a day or a sleepless night [1].

Walker explains why REM in particular should do this. Brain scans of people in REM sleep show visual, motor, memory and emotional regions lighting up, while one region goes the other way: the dorsolateral prefrontal cortex, which handles logical, rational thinking [2]. The result is an experience he calls "utterly bizarre, completely illogical and totally irrational." [2] The chemistry points the same way. In REM sleep noradrenaline is shut off. Noradrenaline normally sharpens the signal-to-noise ratio and keeps us focused and blinkered. Acetylcholine, the chemical that defines REM dreaming, seems to add noise relative to signal [2]. The outcome is a kind of fuzzy logic in which loosely related ideas can find each other [2]. He sums up the function this way: "one function of REM sleep seems to be creativity associating memories together" to reach solutions to problems you could not answer while awake [2].

He also mentions the history. Dmitri Mendeleev dreamed the arrangement of the periodic table after obsessively shuffling cards of the elements. The benzene ring and Otto Loewi's Nobel-winning work on neurotransmission came out of sleep. Paul McCartney woke with the melody of "Yesterday" and wrote Let It Be after dreaming of his late mother, Mary [1]. Every culture, Walker notes, has a version of sleeping on a problem; in Spanish you have a conversation with your pillow, and in French you sleep with the problem [1].

Then comes the qualification, which he calls a twist. Sleep, and even REM sleep, are necessary but not sufficient [2]. In a study by Robert Stickgold at Harvard, participants learned a virtual maze, and half then took a 90-minute nap during which they were woken for dream reports. The nappers navigated better afterward. But when the researchers separated them, people whose dreams had nothing to do with the maze showed no improvement. Only those who dreamed of elements of the maze itself got the benefit [2]. Walker's conclusion: "yes, you need to sleep to get creative benefits and in fact seemingly have dream sleep, but you also need to be dreaming about specific things." [2]

Two more of his points bear on practice. Dreams are not replays: in a study that compared daytime logs with dream reports, only about 2% of dream content was a faithful rerun of waking life, while emotional concerns and significant people carried over like a red thread [2]. And remembering is not required for the work to be done. Not recalling your dreams does not mean you are not getting REM sleep, and he floats what he calls a wacky theory that forgotten dreams may still be stored and shaping behavior [2]. When a shampoo label suddenly unlocks a dream two days later, the memory was there all along: "This is the difference between availability versus accessibility," [2].

Poe, of UCLA, walks through the night in order, and she places the creative work earlier than Walker's emphasis on late REM would suggest. The second and third 90-minute cycles contain progressively more REM, and the hormonal background changes as growth hormone and melatonin decline [4]. Of this stretch she says that many studies are showing "those are the times in sleep when the most creativity can happen." [4] She describes what the dreams are doing: "That's when our dreams can incorporate and put together old and new things together into a new way." [4] Schemas, the frameworks we organize knowledge with, are built then [4].

Her analogy is a computer opening folders and comparing documents. Two documents look almost the same, with a small difference, and the brain can link them conceptually [4]. In her words, "that's probably one of the origins of creativity is finding things that are related, maybe just linked a little bit" and strengthening the link if it makes your schema interesting and different [4].

She also offers a physical candidate for where novel combinations come from. Sleep spindles, the bursts of activity in stage two sleep, come with intense plasticity in the distal dendrites, the branches of neurons that listen to other cortical areas and to the hippocampus [4]. Alongside them are P waves, formerly called PGO waves, which originate in the pons and release glutamate into those same dendrites, and which are even more frequent in REM [4]. They appear sporadic. If they are random, she says, that could be why creativity happens there, "because we're randomly activating, co-activating different things in our brain that we can then sew together." [4] She immediately adds the caveat: "But it might not be as random as we think." [4]

Poe's account explains why the order of the night matters. The first cycle delivers deep slow-wave sleep, a large pulse of growth hormone and a washout of debris, and the first four hours appear especially important for memory processing [4]. Early-night dreams incorporate the day's new experiences more than later dreams do, and as a memory moves from the hippocampus out to the cortex, the dreams that include it shift later in the night [4]. The new material has to be taken in before it can be combined.

Rahul Jandial: the imagination network and the two doorways

Jandial, a neurosurgeon and neuroscientist, describes the dreaming brain in terms of networks. Awake, an executive network runs things like a chief executive. In dreams that network is slightly dampened, while what he calls the imagination network, responsible for loosely connecting the dots, and the emotional limbic system become more active [3]. "Your brain is on fire when you sleep," he says [3]. As evidence that dreaming follows the brain's rules, he points out that "we rarely do math" in dreams, because calculation depends on the dorsolateral prefrontal cortex, part of the executive network that cools during sleep [3]. Creative insights in dreams tend to be visual, like the image of a snake eating its tail associated with a famous chemistry discovery [3].

He differs from the older textbook picture on when dreams happen. Current research, he says, shows dreams can occur throughout the night, including as you fall asleep and as you wake up [3]. And it is those two edges that he uses. For decades he has stayed in bed for five to ten minutes after waking without reaching for his phone, and he says "that window is an interesting idea generator for me." [3] Measurements now show, he says, that in those minutes the brain carries "the electrical fingerprints of being awake and asleep" [3]. He connects the habit to techniques Salvador Dalí wrote about and that were discussed as far back as Aristotle [3].

His routine has two parts. At sleep exit, he lies still, holds on to emotions and images, and after five to seven minutes jots thoughts into his phone, which he says is where nearly all his ideas come from [3]. At sleep entry, he uses suggestion, a mantra, "I will dream and I will remember my dreams." and treats the last five to ten minutes before sleep as a chance to shape what the night works on: "that window is a time to influence the content of your dream as well as the recall." [3] He admits that a scary movie before bed has given him nightmares [3].

Mel Robbins, hearing this, reverses her own approach on the spot. She had always thought of dreams as something to dig through afterward. Now she sees that she can hand her dreaming brain an assignment, a relationship, a next chapter, a creative project, as she falls asleep: "I want my dreaming brain to weigh in on these things that I've been tackling during the day" [3]. She describes the shift as learning "to use it proactively as you enter sleep versus trying to excavate and find something at the end of sleep." [3]

Jandial is careful about two things. First, the process is not a vending machine. "It's not, I put in a problem and I'm waiting for the output," he says. What he notices is that "my thinking is different in that hybrid state in the morning." and he uses the window to think differently about old problems, new problems and new ideas [3]. Recall does not have to mean replaying a dream like a film; it can mean noticing whatever emotions, images and ideas are there [3]. Second, he labels the weaker evidence. Asked how dreams help with problems and skills, he begins, "So these are surveys." [3] Athletes, dart players and language learners report that dreaming helps, and those are self-reports, not proof [3].

Rick Rubin: wake slowly, trust the unconscious, write it down

Rubin is the practitioner among the four, and his habits line up with what the scientists describe. His mornings begin by waking slowly [5]. Andrew Huberman reports elsewhere that Rubin makes gradual transitions from sleep to waking and spends long periods lying still with his eyes closed [1], and passes on a specific tool from him: if you wake from a dream you want to remember, lie completely still with your eyes closed and it will come back; if you wake from a nightmare, get up and move [2]. Walker endorses the first half, advising people to replay the dream with eyes closed and piece it together before opening their eyes and writing or dictating it, because jumping straight to writing makes it dissolve [2].

Rubin writes down exciting thoughts in the morning but does not engage in work until 11 a.m. at the earliest, often 1 p.m. [5]. He has kept dream journals at various times. He does not analyze dreams in the moment, but looking back years later he found that surreal dreams from the same period were all saying the same thing about his life [5]. His view of where ideas come from is the artist's version of the laboratory findings: "The instinct and the unconscious is where the great ideas are," while ideas from the intellect carry much less charge [5]. He protects the far end of the day too, spending evenings under red light and going to bed by 10 [5].

Huberman adds his own practices. He avoids his phone for the first 30 minutes after waking so that ideas born in sleep are not crowded out by outside input [1]. He has long recorded his dreams, sometimes by voice memo in the dark with his eyes closed and the phone in airplane mode, and says the recordings have given him insight and in some cases "a path to solutions" [2].

Get new summaries by email

The GIST of every new summary in your inbox, daily or weekly. Free, and you can unsubscribe any time.

Where They Agree, and Where They Don't

They agree on what sleep does to ideas. Walker's distant associations, Poe's loosely linked documents and Jandial's loosely connected dots are one description in three vocabularies [1][3][4]. All three also give the same anatomical reason: the logical, executive part of the frontal lobe is turned down while memory, imagery and emotion run [2][3].

They agree that the handoff at waking is fragile. An alarm, a phone or a jumping child brings the executive network back abruptly and erases what was there [3]. Walker, Jandial, Rubin and Huberman all recommend stillness first and capture second [1][2][3][5].

They place the creative work at different points in the night. Walker's evidence is about REM sleep specifically, and REM is concentrated toward morning [1][2]. Poe points to the second and third cycles, the middle of the night, and to stage two spindles as well as REM [4]. Jandial says dreams occur in every stage and puts his own practice in the half-awake transitions [3]. These are compatible if the night is a sequence: new material is taken in and moved early, combined in the middle and late cycles, and noticed at the edges. But a reader should know that the sources do not give one agreed answer about which part of sleep is the creative part.

They differ on whether you must remember the dream. Walker says there is no strong link between dream recall and how good the next day feels, and that REM does its work whether or not you remember [2]. The Number Reduction and anagram results did not depend on anyone reporting a dream [1]. Jandial's whole method is built on recall, though he defines it loosely [3]. And the Stickgold study suggests that what you dream about matters, which is different from whether you remember it [2].

They differ on how directly you can steer it. Jandial and Robbins talk about priming the content of dreams in the last minutes before sleep [3]. Walker's evidence shows that dreaming about the problem is what helps, and Huberman stresses that the famous insights followed intense waking effort [1][2]. Walker also describes experiments in which a sound or smell paired with learning and replayed during sleep strengthens those specific memories, which shows the sleeping brain can be pointed [2]. But Jandial himself warns that the link between what you watch at bedtime and what you dream is not exact or linear [3]. Nobody here claims you can order a solution.

They differ on lucid dreaming. Jandial teaches a method for it and reports benefits such as athletic rehearsal, while noting they come from surveys [3]. Walker argues both sides: some studies find people feel less refreshed after lucid nights, others do not, and he questions whether we should override what evolution chose to put on the dream menu [2]. Huberman decides against encouraging it for himself, preferring deeper, longer sleep [2].

They differ on the transition state versus full sleep. The Edison and Dalí techniques exploit the moment of drifting off [1][3]. Walker's experiments concern a full night or a proper REM period [1]. The sources treat both as real and do not compare them.

Why It Works

The editor is off duty. In REM sleep the dorsolateral prefrontal cortex quietens while visual, memory and emotional regions are active [2]. Jandial describes the same thing as the executive network dampening and the imagination network taking the lead [3].

The chemistry widens the search. Noradrenaline, which narrows attention, is shut off in REM, and acetylcholine adds noise, producing loose associations [2]. Poe adds that REM is the only time the locus coeruleus, the source of that noradrenaline, shuts off completely [4].

Random activation creates new pairings. P waves fire in an apparently sporadic way into dendrites that receive input from across the cortex, co-activating things that can then be stitched together, with Poe's caveat that the randomness is not established [4].

Memories are replayed and relocated. Hippocampal firing patterns from the day replay during non-REM sleep at 10 to 20 times speed and during REM at about half speed [1][2]. Spindles mark the period when the hippocampus writes to the cortex [4]. Once new material sits alongside old material in long-term storage, it can be compared with it.

New and old are compared. Poe's folders and documents, and her point that schemas are built in the middle of the night, describe the combining step [4].

The measured effects. About 30 percent better anagram solving from REM awakenings, a threefold increase in finding a hidden rule after a night of sleep, and improvement in a maze only among those who dreamed of it [1][2].

The hybrid state has its own signature. Jandial says the minutes of falling asleep and waking show electrical features of both states [3], which is his explanation for why thinking feels different there.

Where It Applies, and Where It Doesn't

It applies to problems you have already worked on. Mendeleev had shuffled his cards obsessively. Huberman's point is that the insights came after intense effort [1]. Sleep recombines what is in the brain, so the material has to be there.

It favors insight over calculation. Walker's tasks reward seeing a hidden pattern [1]. Jandial notes that we rarely do arithmetic in dreams and that dream insights tend to be visual [3]. Sleep is for finding the shortcut, not for doing the long division.

It fails when sleep is cut or chemically altered. REM grows longer toward morning, so an early alarm removes a disproportionate share of it, and the stage two spindles that are densest in the last quarter of the night go with it [1][3][4]. Alcohol suppresses REM and the spindle-rich transition into it [4]. Going to bed far later than usual means missing the early-night slow-wave work, which is not postponed [4]. Sleep debt is only partly repaid; after losing a full night people recover at most about half [2].

It is not a reason to stay up. Walker and Huberman both note that ideas that feel brilliant when you are sleep-deprived usually are not [1].

Much of the dream-practice advice rests on reports, not trials. Jandial says so about skills and problem solving [3]. The historical stories are anecdotes. The controlled findings are Walker's and Stickgold's [1][2].

You cannot force it, and trying too hard can cost sleep. Poe advises entering sleep calm, saying "try and enter sleep with as much calm as you can." and avoiding excessive novelty and stress before bed [4]. Loading a problem is different from wrestling with it at midnight. Walker warns separately about anxiety over perfect sleep, which trackers can feed [1].

Sleep problems are a medical matter. Persistent insomnia, loud snoring, or nightmares that return and worsen over weeks are things to raise with a doctor, as these experts themselves advise [2][3].

What To Do With It

  1. Do the hard thinking during the day, then revisit the problem briefly before bed. Work it properly while awake, and in the last five to ten minutes before sleep bring it to mind once more as an assignment, the way Robbins describes [1][3]. Keep it calm [4].

  2. Protect the whole night. Keep the last hours, where REM and spindles are concentrated, and keep a regular bedtime so the early and middle stages arrive on schedule. Poe says consistent bedtimes matter, and Walker's single tip is "Just keep things regular." [2][4]

  3. Skip the nightcap on nights that matter. Alcohol suppresses REM sleep and the spindle-rich stage that leads into it [4].

  4. Wake slowly. Where you can, avoid a jarring alarm. Stay still for five to ten minutes with your eyes closed [3]. If you were dreaming, replay it in your head before you move [2].

  5. Capture before input. Write or dictate what is there, whether a dream, an image, a feeling or a half-formed idea, before opening email or social media. Huberman waits 30 minutes before touching his phone; Robbins prefers a notepad so the phone does not swallow her [1][3].

  6. Do not demand a dream. Jandial writes down thoughts and emotions even when he recalls no dream at all [3]. The benefit of REM does not depend on recall [2].

  7. Use naps for the same purpose. A 90-minute nap produced the maze improvement in those who dreamed of the maze [2]. Edison dozed holding steel ball bearings over a saucepan so the crash would wake him at the moment of drifting off, ready to write [1].

  8. Keep a dream or idea journal and reread it later. Rubin found patterns only when he looked back years afterward [5]. Walker's view is that the best person to interpret your dreams is probably you [2].

  9. Schedule the deliberate work for later in the morning. Rubin notes his ideas on waking and starts focused work at 11 or later [5]. Walker suggests timing demanding learning to your own circadian peak [1].

  10. Treat the sleepless breakthrough with suspicion. If an idea arrived at 3 a.m. after too little sleep, check it again once you are rested [1].

Sources

  1. Dr Matt Walker Using Sleep To Improve Learning Creativity Memory · Huberman Lab
  2. Dr Matt Walker The Science Of Dreams Nightmares Lucid Dreaming · Huberman Lab
  3. Dr. Rahul Jandial on the Science of Dreams: Nightmares, Dream Recall and How to Lucid Dream · The Mel Robbins Podcast
  4. Dr. Gina Poe on How Each Stage of Sleep Shapes Learning, Memory, Creativity, and Emotional Recovery (Huberman Lab Essentials) · Huberman Lab
  5. Rick Rubin: Protocols to Access Creative Energy and Process · Huberman Lab