Dreaming may be a sign our brain is working hard in our sleep
Napping after learning something new could help you commit it to memory - as long as you dream, scientists say.
They found people who dream about a new task perform it better on waking than those who do not sleep or do not dream.
Volunteers were asked to learn the layout of a 3D computer maze so they could find their way within the virtual space several hours later.
Those allowed to take a nap and who also remembered dreaming of the task, found their way to a landmark quicker.
The researchers think the dreams are a sign that unconscious parts of the brain are working hard to process information about the task.
Dr Robert Stickgold of Harvard Medical School, one of the authors of the paper, said dreams may be a marker that the brain is working on the same problem at many levels.
He said: "The dreams might reflect the brain's attempt to find associations for the memories that could make them more useful in the future."
Co-author Dr Erin Wamsley said the study suggests our non-conscious brain works on the things that it deems are most important.
"Every day we are gathering and encountering tremendous amounts of information and new experiences," she said.
"It would seem that our dreams are asking the question, 'How do I use this information to inform my life?"
The research, published in the academic journal Cell Biology, could have practical implications.
The scientists say there may be ways to take advantage of this phenomenon for improving learning and memory.
For example, students might be better studying hard before bedtime, or taking a nap after a period of afternoon study.