The average American sleeps some 7.6 hours a night—maybe not as much as one would like, but a number that still amounts to more 200,000 hours total over the course of a lifetime. What if there were some way to use all these hours to do something we don’t have the time to do while awake, like learn to play a musical instrument or speak a foreign language?

The idea that you can learn new things through some sort of magical mental osmosis while you sleep has long been wishful thinking. But a new study by Northwestern University researchers indicates that, depending on what we hear during the night, it is indeed possible to reinforce existing memories and enhance our recall after we wake up.

In the study, published today in the journal Nature Neuroscience, the research team first had participants learn how to play a pair of songs by pressing keys on a keyboard in a specific sequence. Then the test subjects were left in a dark, comfortable room to take a 90-minute nap. Once the participants were in slow-wave sleep—the deepest part of the sleep cycle, which the research team suspected was the stage most conducive to memory enhancement—one of the songs was played repeatedly. When tested after their naps, the participants consistently performed better at recalling and playing the song they had heard while sleeping, compared to the other tune.

This differs from the apocryphal concept of learning new information—say, a foreign language, or material for an upcoming exam—simply by listening to it during the night. “The critical difference is that our research shows that memory is strengthened for something you’ve already learned,” said Paul J. Reber, a psychologist at Northwestern and co-author of the study, in a press release. “Rather than learning something new in your sleep, we’re talking about enhancing an existing memory by re-activating information recently acquired.”

Additionally, the researchers measured brain activity during the sleep stage of the experiment. “We also found that electrophysiological signals during sleep correlated with the extent to which memory improved,” said lead author James Antony. “These signals may thus be measuring the brain events that produce memory improvement during sleep.”

Previous work by members of the same team had indicated just how surprisingly active our brains are during sleep—and how we might exploit this activity to improve memory. In a 2011 study, the researchers had participants memorize associations between various images and sounds with locations on a computer screen before taking a nap. Then, while the subjects slept, the researchers played some of the sounds back to them. Afterward, the participants were more adept at remembering the memorized locations for sounds they’d heard while sleeping than those they hadn’t, just as with the melodies in the new experiment. Strikingly, the sounds hadn’t woken the sleepers, and they had no conscious memory of having heard them during their naps.

For the researchers, the experiment demonstrated a counterintuitive fact about sleep: although previous studies assumed that mind would be most active during rapid-eye movement (REM) sleep, which is when most dreams occur, it seems that the deeper slow-wave sleep is actually a period of significant mental activity. “We are beginning to see that deep sleep actually is a key time for memory processing,” said Ken Paller, the lead author of the earlier study.

Although scientists don’t have a full understanding of how our brains cement memories during deep sleep, they believe that the mind may habitually review the day’s events during each night of sleep. The new study establishes that this tendency might lend itself to the intentional reinforcement of memorizing relatively complex tasks. The researchers plan to further probe this ability by testing whether other sorts of memories, such as motor skills or other habits, might be enhanced by exposure to stimuli during sleep.

In the meantime, this experiment should be inspiring for enterprising do-it-yourself folks interested in maximizing their own memory potential. For those seeking to learn a new language, memorize vocabulary or commit lines of dialogue to memory, you’ve got about 7 more hours a day to work with.