The remaining two groups got an extra challenge. Right before the test, they saw another set of word pairs that was very similar to the word pairs they had memorized.

Those participants were tested on both sets of word pairs. The point was to see whether their memory was distracted by the new set of word pairs.

The students who slept at home before the tests performed best. They correctly identified about three-quarters of the word pairs.

In comparison, the students who took the test before going home for the evening correctly identified about one-third of the word pairs

"This is the first study to show that sleep protects memories from interference," Ellenbogen says in an American Academy of Neurology news release.

"These results provide important insights into how the sleeping brain interacts with memories: It appears to strengthen them," he says. "Perhaps, then, sleep disorders might worsen memory problems seen in dementia."