Studies of the brain using the video game Duke Nukem have shown how sleep affects long-term memory.
Time spent in bed could make you a better gamer
The Belgian team used MRI scans to see how volunteers stored spatial information from the game.
Sleep-deprived gamers recalled information from a different part of the brain to those who slept.
Writing in Proceedings of the National Academy of Sciences (PNAS), the team said its work also shed light on how we navigate in the real world.
"If you move to a new town, you have to think about where you are going," said Pierre Orban of Liege University in Belgium, one of the authors on the paper.
"But with time, once you know the city, you don't have to think about your route anymore."
This automatic behaviour may be enhanced by sleep, the researchers believe. It mimics patterns of memory formation seen when a task is repeated.
The work also explains how the brain is able to file and store this information.
It has long been thought that sleep deprivation affects your ability to consolidate memories.
To test the theory, the researchers gave the volunteers place-finding missions in a virtual city created in the Duke Nukem game.
After an initial period of training to get used to the virtual terrain, the gamers were asked to find landmarks around the city while the scientists mapped their brain activity with MRI.
Scans showed that the hippocampus, an area of the brain known to be involved in memory and direction, was most active when the gamers had to retrieve memories to reach their destination.
The volunteers were then split into two groups: those that were allowed a good night's sleep and those that were not.
On the second and third nights of the test, both groups were allowed to sleep soundly.
Volunteers were then asked to play the game again, navigating the streets between two landmarks as quickly as possible, while the scientists watched their brain activity with MRI.
The closer a gamer got to the final landmark, the better the score.
The researchers found that the group who had slept recalled information from an area of the brain known as the striatum.
Storing these memories allowed them to make automatic decisions about the direction they had to travel.
Sleep-deprived gamers, who still relied on the hippocampus, had to think harder about their virtual navigation.
"If you have slept, you use a means of navigation that is less thoughtful," Mr Orban told the BBC News website.
"You somehow know that you have to turn left, or right or carry straight on."
This work shows that sleep trains the brain and promotes memory reorganisation from the hippocampus to the striatum, meaning that navigation becomes more automatic.
"It looks like sleep accelerates this normal process. It looks like the memories are reprocessed during sleep," said Mr Orban.
The research could be good news for gamers who often rely on their quick reactions to navigate virtual worlds.
However, the team found that eventually both methods of memory retrieval were as effective in the tasks, meaning that while sleep deprivation affects brain function it does not affect overt behaviour, as previously thought.