Does exercise or a nap protect memory after an all-nighter?
Both do, and about equally well. After 30 hours without sleep, adults who cycled hard for 20 minutes or took a 90-minute nap scored about 22% better on a memory test than adults who did nothing.
Sleep loss damages memory in a specific way. It weakens your ability to lay down new memories, not just your ability to dig up old ones. Researchers at McGill University and the Jewish Rehabilitation Hospital in Montreal wanted to know whether a short bout of exercise could stand in for a nap in the many situations where napping is not practical, such as a hospital night shift or a long haul behind the wheel.
They enrolled 53 healthy young adults, average age about 25, and kept them awake in the lab for 30 straight hours. Then they randomly assigned each person to 20 minutes of moderate to vigorous cycling at 80% of maximum heart rate, a 90-minute nap opportunity, or 20 minutes sitting on the same stationary bike without pedaling. Afterward, everyone viewed a series of images while wearing a 64-channel EEG cap. Three days later they returned for a surprise memory test.
What the data show
Memory differed across the three groups, with less than a 2 in 100 chance that the gap was coincidence (P = 0.0161). The exercise group correctly recognized about 21% more of the previously seen images than the control group, and the nap group about 23% more. In absolute terms that works out to roughly 10 more correct answers for every 100 old images shown (mean difference 0.098 for exercise, 0.11 for the nap). Both effects were large by the usual statistical yardstick (Cohen’s d of 1.0 and 0.91). Exercise and napping did not differ from each other.
Dr. Kumar’s Take
The interesting part is not that sleep matters. That is old news. It is that 20 minutes on a bike bought about the same memory protection as an hour and a half of sleep, and did it without leaving people feeling more tired. Fatigue ratings after exercise were no worse than in the group that sat still. That is a real finding for anyone who cannot nap on command.
This is not evidence that exercise replaces sleep. The authors say so plainly, and they are right. Memory encoding is one job sleep does among many. The narrow, useful claim is this: if you are already sleep deprived and about to learn something, moving first beats sitting.
How exercise and naps protect memory after sleep loss
The EEG recordings show two different routes to the same finish line. Napping lowered sleep pressure, the slow electrical waves that build up the longer you stay awake. Slow wave activity over the front of the head was significantly lower in the nap group than in the control group, and those brain-state markers were what predicted memory in nappers.
Exercise did not lower frontal sleep pressure at all. Instead, memory in the exercise group tracked classic encoding signals: the P300 brain response, which reflects how attention is allocated to an image (r = 0.72), and beta desynchronization, a marker of active neural processing (r = 0.54). The nap made the brain ready to learn. Exercise helped a tired brain get more out of what it had left.
Safety, limits, and caveats
The exercise comparison landed exactly on the usual significance threshold (P = 0.05), which makes it the weaker of the two results. Groups differed on hit rate but not on d-prime, a stricter score that also penalizes false alarms, so this is best read as a signal about encoding strength rather than proof of sharper overall discrimination. Everyone was a healthy young adult, and this was a single lab-induced night of sleep loss, not the chronic short sleep that shift workers actually live with. Whether the same protection appears in older adults, or after weeks of poor sleep, is untested.
Practical Takeaways
- If you have been up all night and have to absorb new information, 20 minutes of hard cycling first is a reasonable move, since it improved memory here without adding fatigue.
- When a nap is possible, protect a full 90-minute window rather than a quick doze, because the benefit in this trial came from a real sleep opportunity.
- Do the exercise or the nap before the learning, not after. Both interventions were delivered ahead of the memory task.
- Treat either one as damage control for a bad night, not as a substitute for sleeping properly.
Related Studies and Research
- Sleep deprivation vs alcohol: 17-19 hours awake equals 0.05 BAC
- Practice plus sleep makes perfect: how sleep enhances motor skill learning
- Acute sleep loss impairs physical performance: systematic review and meta-analysis
- How much does sleep restriction actually hurt your brain?
FAQs
Would a 20-minute power nap work as well as a 90-minute one?
This trial cannot answer that, because it only tested a 90-minute nap opportunity. The researchers chose that length on purpose and explained why: after a full night of sleep loss, naps of 30 and 60 minutes had failed to show restorative benefits in earlier work, and reaching slow wave sleep, the deep stage, is what declarative memory appears to need. That reasoning fits their EEG results, where the nap group’s advantage traveled through reduced sleep pressure. Short naps have well-documented value for alertness, but alertness and memory encoding are not the same thing.
How hard does the exercise have to be?
Participants pedaled at 80% of their maximum heart rate. That is hard work, not a stroll. The study did not test lighter intensities, so there is no basis here for saying a gentle walk does the same thing. If you have heart disease or another condition that limits exercise, the intensity used in this trial is not something to try on your own judgment.
Does this mean I can skip sleep as long as I exercise?
No, and the researchers went out of their way to say so. They tested one narrow outcome, the ability to form new memories for pictures, after one night of missed sleep. Sleep also clears metabolic waste from the brain, regulates hormones and blood sugar, supports immune function, and consolidates memories that are already formed. None of that was measured. The honest reading is that exercise is a stopgap for a specific cognitive problem, not a workaround for sleep itself.
Bottom Line
In 53 healthy young adults kept awake for 30 hours, a 20-minute hard bike ride and a 90-minute nap each preserved the ability to form new memories, with roughly 22% better recognition than doing nothing, and neither beat the other. The EEG data show they got there differently: the nap lowered sleep pressure and made the brain receptive to learning, while exercise let a fatigued brain use its remaining resources more efficiently. For people in jobs where napping is not an option, that is a useful alternative worth testing in the real world.

