Intensive physical exercise four hours after learning is the key to remembering information learnt, say Dutch researchers.
Exercise is known to release proteins that can boost the part of the brain related to memory, and this study suggests the timing of it is crucial.
The study, in Current Biology, tested 72 people on their memory recall.
And it found exercising a few hours after learning was more effective than immediately afterwards.
After spending 40 minutes on a learning task, the 72 people were split into groups:
- one exercised straight away
- the second performed exercise fours hours later
- the third did not do any exercise
The activity consisted of 35 minutes' vigorous exercise on an exercise bike.
When they were all tested on how much they had remembered two days later, the second group performed best.
Brain images using MRI showed this group's activity patters in the hippocampus - which is connected to learning and memory - were sharper.
It is thought the chemical compounds produced in the body by physical exercise, including dopamine and norepinephrine, can help to improve memory.
Guillen Fernandez, lead researcher, from the Donders Institute for Brain, Cognition and Behaviour, in the Netherlands, said: "Our results suggest that appropriately timed physical exercise can improve long-term memory and highlight the potential of exercise as an intervention in education and clinical settings."
He added that exercise was particularly effective for consolidating weak memories.
But it was not clear why delayed exercise had a positive effect on long-term memory.
And the research team will now study the timing of exercise and its influence on learning and memory.