The task looks as simple as a “Sesame Street” exercise. Study pairs of Easter eggs on a computer screen and memorize how the computer has arranged them: the aqua egg over the rainbow one, the paisley over the coral one — and there are just six eggs in all.

Most people can study these pairs for about 20 minutes and ace a test on them, even a day later. But they’re much less accurate in choosing between two eggs that have not been directly compared: Aqua trumped rainbow but does that mean it trumps paisley? It’s hazy.

It’s hazy, that is, until you sleep on it.

In a study published in May, researchers at Harvard and McGill Universities reported that participants who slept after playing this game scored significantly higher on a retest than those who did not sleep. While asleep they apparently figured out what they didn’t while awake: the structure of the simple hierarchy that linked the pairs, paisley over aqua over rainbow, and so on.

“We think what’s happening during sleep is that you open the aperture of memory and are able to see this bigger picture,” said the study’s senior author, Matthew Walker, a neuroscientist who is now at the University of California, Berkeley. He added that many such insights occurred “only when you enter this wonder-world of sleep.”