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."