Going to the gym can not only keep your body in shape but can boost memory as well, researchers have found.
In an experiment, people who learnt some information were more likely to retain it after a strenuous workout.
But the benefits only happened if the exercise was undertaken several hours after the learning rather than immediately.
It seems that exercising produces chemicals in the brain that help "fix" memories in place, as long as we have had some time to mull them over first.
Dutch researchers found that people who exercised four hours after learning something retained the information better two days later than those who exercised either straight after studying or not at all.
Professor Guillen Fernandez, from Radboud University Medical Centre in the Netherlands, said: "We can improve memory consolidation by doing sports after learning.
"Our results suggest that appropriately timed physical exercise can improve long-term memory and highlight the potential of exercise in educational and clinical settings."
The effects of a single session of physical exercise was tested after 72 participants were asked to try to retain newly learnt information.
The group was then randomly split into three groups, who either exercised immediately, after four hours, or not at all.
Those made to do a workout spent 35 minutes on an exercise bike set to a high intensity level.
Two days later, their brains were scanned using magnetic resonance imaging (MRI) during a test to see how much of the information they remembered.
The resulting brain images showed that exercise after a time delay was linked to more precise representations in the hippocampus, an area important to learning and memory, when an individual answered a question correctly.
It is not yet clear exactly how or why delayed exercise has this effect on memory, but earlier studies of laboratory animals hint that chemicals occurring naturally in the body, known as catecholamines, can help improve memory.
One way to boost catecholamines is through physical exercise.
Professor Fernandez, whose findings were published in the journal Current Biology, said they will now carry out further studies to find out in more detail the influence that exercise has on learning.