Exercise is one of the few sleep interventions with a genuinely solid evidence base. It is also routinely oversold, so it is worth being precise about the size and the timing of what it does.
What the evidence shows
Meta-analyses of exercise and sleep consistently find improvements in sleep quality, sleep efficiency (the proportion of time in bed actually asleep), and time to fall asleep, with reductions in daytime sleepiness.
For chronic insomnia specifically, exercise performs reasonably well — not as well as CBT-I, which remains first-line, but well enough to be a standard recommendation alongside it.
The effect sizes are moderate rather than dramatic. Typical findings are on the order of ten to fifteen minutes less time to fall asleep and modest gains in efficiency. Real, worth having, and not a transformation.
Why it works
Several mechanisms, and none of them is "you tire yourself out," which is the folk explanation and the weakest.
Core temperature. Exercise raises core temperature, and the subsequent fall is a sleep-onset signal. This is the same mechanism as a hot bath in the evening, and it is why timing matters. (The bath version, which is better studied.)
Circadian anchoring. Regular exercise at a consistent time acts as a zeitgeber — a timing cue that reinforces the clock, particularly when done outdoors where you also get light.
Sleep pressure. Physical activity increases adenosine accumulation, the molecule underlying the drive to sleep.
Anxiety and mood. Exercise reduces both, and for a large share of people the barrier to sleep is a nervous system that will not settle rather than insufficient tiredness. (When your body is exhausted but your mind will not stop.)
Slow-wave sleep. Studies fairly consistently show increased deep sleep after exercise, which is the stage most associated with physical restoration. (How much you actually need.)
The timing question, honestly
The old advice was to avoid exercise within three hours of bed. That has been substantially revised.
Recent reviews find that for most people, evening exercise does not impair sleep and may improve it — provided it is not vigorous and finishing within about an hour of bedtime. Moderate evening exercise appears fine or beneficial.
The exception is real though: high-intensity work close to bed raises core temperature and sympathetic arousal at the moment both need to be falling. If you finish a hard session at 10pm and cannot settle, that is not in your head.
Practical rule: moderate exercise any time. Vigorous exercise, leave 90 minutes or more before bed. Individual variation is large, so test it. (When to train for other outcomes.)
The lag people do not expect
This is where most disappointment comes from.
One workout does not reliably fix one night. The acute effect of a single session on that night's sleep is small and inconsistent across studies. Some people notice it; plenty do not.
The reliable effect is chronic. Regular exercise over weeks improves sleep measurably. Trials generally run four to sixteen weeks to detect it.
So the honest expectation: do it consistently for a month before judging. Judging it on Tuesday night after Tuesday morning's run is the wrong test.
What kind
Aerobic exercise has the most evidence — walking, running, cycling, swimming.
Resistance training also shows benefit, and some reviews find it comparable or better for sleep quality specifically. It is under-studied rather than ineffective.
Outdoors beats indoors, because you get bright light as well, which anchors the clock independently. A morning walk outside is doing two things at once. (How much daylight you actually need.)
Consistency beats intensity. Moderate activity most days outperforms two hard sessions a week for this purpose.
Where it does not help
Worth being clear, because exercise gets recommended for problems it does not touch.
It does not treat sleep apnea. Weight loss from exercise can reduce severity, and one study found vigorous activity tracked with less fragmented sleep in women with apnea but not men — but exercise is not a treatment. If you snore loudly, gasp awake, or feel exhausted regardless of hours, get assessed. (How to decide.)
It does not fix a mistimed clock. If you are going to bed at 2am, exercise will not resolve that. Light timing will.
It does not overcome a fragmented night. If something is breaking your sleep into pieces — disrupted breathing, alcohol, a hot room — exercise adds a small benefit on top of a compromised night rather than fixing it. (The research on nasal breathing and recovery.) (Work the checklist.)
The bottom line
The evidence is good: better sleep quality, better efficiency, faster onset, more deep sleep — moderate in size and reliable in direction.
Expect it over weeks rather than tonight. Moderate exercise at any hour, vigorous work finished 90 minutes before bed, outdoors where possible, consistently rather than heroically.