Like so many animals, mice enter a world of imagination when they doze off. We know this because their beady little eyes flicker back and forth as their brains hum in the key of dreams.

Now, thanks to a study on the brains of sleeping rodents, we can say with greater confidence why these rapid eye movements (REM) occur.

Researchers have been studying the phenomenon of dream-based eye-flickering since the 1950s. Sleepers who awoke from vivid dreams tended to display particularly exaggerated eye movements, making it easy to assume their eyes happened to be keeping track of the make-believe scenery in their dreamscape.

Though as reasonable as the assertion might be, it's a challenging hypothesis to support experimentally. Most studies to date have relied on awakened sleepers self-reporting their dreams, which researchers related to their eye movements – but that approach leaves too much room for doubt.

Other researchers have pointed out REM sleep can occur in absence of dreams, notably in young babies and in people with brain trauma that presumably leaves them unable to visualize. We can also dream without entering REM sleep.

Importantly, not all studies back up what's referred to as the 'scanning hypothesis'.

Alternatively, the quick movement of our eyeballs beneath their lids – described as saccades – might simply be a nervous response to more fundamental activity that emerges when the brain is no longer tethered to consciousness.

To move beyond the difficulties of studying the neurology of dreaming humans, scientists from the University of California, San Francisco, used mice as a proxy.

Specifically, they measured the activity of nerve cells in the mouse thalamus that are responsible for pointing the head in a particular direction.

In awake mice, saccades tend to line up with head movements as mice navigate the real world. Matching eye movements with nervous impulses for head direction would be a major piece of evidence in support of the scanning hypothesis.

The team used small implanted probes to record the neural activity of the mice, allowing them to freely explore their environments while awake. Meanwhile, a series of cameras captured every dart and blink of their eyes.

When the tired test subjects curled up for a nap, the sensors kept on recording. Baselines in neural activity and saccades established during the waking periods were then used to determine how likely it was the eye movements during REM were also related to their intended direction through their mental world.

Their results provide fairly clear, objective evidence connecting the mouse's rapid eye movements and its brain's control over head movements. Just as when awake, larger, jerkier eye movements predict stronger changes in head direction as directed by the thalamus, for example.

Of course, we're left with the usual caveat of connecting the results of an experiment on mice with the same kind of behavior in humans.

Short of replicating similar precise measures on a convenient human brain – an invasive procedure that isn't without precedent in dream research – it's the most direct evidence for the scanning hypothesis you'll get.

All of this points to a higher level of coordination across the brain during REM sleep that continues to direct the movements of a body through an imagined space.

Aside from weighing in firmly on one side of a decades-old debate, the discovery could have implications for further research.

According to a commentary by neurologists Cathrin Canto and Chris De Zeeuw from the Netherlands Institute for Neuroscience, reading the eye movements during sleep could help inform therapies for improving memory or managing trauma.

It could also give us more insight into the very purpose of our unconscious wanderings.

"Muscle twitches, which also frequently occur during REM sleep, might be related to the internal heading cues provided by rapid eye movements, and analyses of these might give further information about dreams," Canto and De Zeeuw write.

As to what it is mice might see in their mind's eye as they sleep, that we can only imagine in our wildest dreams.

The research was published in Science.