When you train shapes how you sleep: exercise timing rules
Andy Galpin, Walker, Hattar and Huberman discuss how morning or afternoon exercise supports sleep while late, stimulant-fueled sessions can delay it. For people who can only train at night, they describe how to limit the damage.
The Short Version
Exercise improves sleep, and when you do it decides how much of that benefit you keep. Andrew Huberman's rule, drawn from a study he describes in detail, is to do moderately hard exercise at least six hours before bed, and he says intense exercise inside that window can cut both deep and REM sleep for many people [1][2]. Morning training has an extra payoff: Huberman, Matt Walker and Samer Hattar all pair it with daylight as a double wake-up signal for the body clock, and Hattar's sleep, eating and weight fell apart when he moved his workouts to the evening [4][5][6]. None of them tells late trainers to quit. Huberman and Andy Galpin both say an evening session beats no session, and they describe how to limit the damage: no caffeine, a long breathing cool-down, a hot shower, and a small meal so hunger doesn't wake you [1][3].
Table of contents
What They Said
Huberman: the six-hour line, and the study behind it
Huberman's clearest statement comes in answer to a listener whose tracker showed plenty of REM sleep and little deep sleep [2]. After listing what to avoid, he names exercise as the first well-documented tool for raising slow-wave sleep and describes a randomized crossover study titled "Exercise Improves the Quality of Slow-wave Sleep by Increasing Slow-wave Stability" [2]. Participants did 60 minutes of exercise at 60% of VO2 max, which Huberman places at roughly zone three or four, fairly challenging cardio [2]. The session was done at least six hours before bedtime, and the participants avoided caffeine and alcohol in every condition [2]. Slow-wave sleep, measured by EEG, improved [2].
Two details of that study matter for anyone applying it. First, the participants did not report feeling much better; Huberman argues the gain counts anyway because slow-wave sleep is when most of the night's growth hormone is released and when the brain clears debris linked to conditions like dementia [2]. Second, the study tested cardio, not lifting. Huberman suspects moderately intense resistance training done far enough from bedtime would help in a similar way, but he presents that as his guess [2].
His summary of the protocol is "getting an hour of exercise that's moderately intense and making sure that you're not doing that exercise within the six hours prior to bedtime" [2]. He then states the other side of the line: intense exercise within six hours of bed can reduce both slow-wave and REM sleep for many people [2]. In his conversation with Galpin he gives the same rule in slightly different form, saying papers suggest keeping anything but low-intensity exercise about six hours from sleep [1].
In an earlier solo episode he was less categorical. There he said, "some people find if they exercise late in the day they have trouble sleeping in general intense exercise does that whereas the kind of lower intensity exercise doesn't" [6]. Intensity is the variable he keeps returning to: an easy session late in the day is not the problem, a hard one may be [1][2][6].
Huberman: three windows, and why the morning trains your clock
Asked what kind of exercise is best for sleep and when to do it, Huberman begins with a caution that "there's a lot of individual variability around this" [6]. He rejects the neat formula that cardio belongs in the morning and weights in the afternoon, saying there is far more individual variation than that [6]. What he does find in the chronobiology journals he reviewed are three windows tied to body temperature in which performance may be better and injury less likely: about 30 minutes after waking, which he links to the rise in cortisol on waking; about three hours after waking, which he links to rising body temperature; and about 11 hours after waking, when temperature tends to peak [6].
He is careful about how firmly to hold these. "I would never want these recommendations to seem like recommendations," he says; they are opportunities [6]. For people with busy schedules, "it's advantageous to be able to do your training whenever you have the opportunity to do it" [6].
The morning window carries a benefit the others don't. If you exercise first thing in the morning for three or four days, Huberman says, the body develops an anticipatory circuit that makes you want to wake at that time [6]. He adds that you still want light exposure, because "light and exercise converged to giving even bigger wake up signal to the brain and body" [6]. The same plasticity applies to meals and other habits: keep a rough rhythm and the body starts preparing in advance [6].
He also offers a way to read your sleep for signs that training itself is the problem. If you sleep your usual amount but wake unrested, the intensity of the previous two or three days of training may be too high; if you can't recover no matter how much you sleep, the volume may be too high [6]. He notes he is not an exercise scientist and that these are correlated [6].
Galpin: enough intensity to deepen sleep, placed where it won't cost you
Galpin's contribution starts with a dose. About 30 minutes or more per week in the top 10% of your heart rate can improve deep sleep, he says, as long as it isn't done close to bedtime [1]. So hard training is part of the sleep prescription; the placement is what needs care.
His coaching experience supplies the cautionary case. With professional athletes who complained of poor sleep, full sleep studies sometimes showed the answer was simply to stop doing intervals at 8 p.m. [1]. A great deal of testing arrived at a scheduling fix.
Galpin's main tool for people who do train late is down-regulation breathing at the end of the session, scaled to the work: the harder and longer the session, the longer the cool-down [1]. His favourite conditioning finisher shows the shape he has in mind: a 10-minute warm-up, five all-out minutes on an assault bike, and a 10-minute cool-down that ends in slow nasal breathing [1].
His program-design rules bear on timing too. Do what matters most first, and put it where your schedule and energy are most reliable; at his former company the rule was Drop Everything and Train at 3 p.m. [1]. He insists that you work with the non-negotiables in your life, because "life will win" where children and work are concerned [1]. That is why neither he nor Huberman turns the six-hour guideline into a ban. Huberman says in the same conversation that training in the evening is still better than not training, and repeats Galpin's line that consistency always beats intensity [1].
On caffeine, Galpin says he personally doesn't do well on it [1]. Huberman's point to him is that caffeine within roughly 8 to 10 hours of bed disrupts sleep architecture even if you can fall asleep, so being able to train without it is valuable [1].
Galpin also answers the reverse question, how sleep should change training. In a push phase, one bad night is no reason to skip a session, but a pattern of poor nights calls for restorative work such as an easy bike ride, sauna or mobility [1].
Hattar: a morning exerciser who tried evenings
Hattar, who studies how light sets the body's clock, treats exercise as one of several timed inputs alongside light, sleep and meals [4]. He goes to sleep around 9 p.m., wakes between 4:30 and 5 a.m. without an alarm, and exercises in the morning [4]. On that aligned schedule he went from 275 to 219 pounds [4].
His evidence on evening training is a personal experiment he didn't intend to run. He once switched to evening workouts to avoid traffic, and his sleep, waking, food intake and weight all fell apart [4]. He offers two possible reasons, body heat and bright gym lights, and does not claim to know which it was [4].
Hattar frames this with what he calls the tripartite model: the circadian clock, the homeostatic drive to sleep, and the direct effects of the environment all have to be considered together, and even with a good rhythm and strong sleep pressure, light at the wrong time or stress can wreck sleep [4]. A late gym session can add the wrong input on that third channel. He is explicit that his timetable is his own and not a prescription; the task is to find the phase relationship between light, sleep, meals and exercise that makes you feel best, and he believes light is the strongest time cue and should be regulated first [4].
He also uses exercise as a clock-shifting tool. When Huberman flew to Abu Dhabi, a 12-hour flip, and fell apart trying to force the adjustment with sunrise light, Hattar told him to work out at local dawn, eat, and begin viewing sunlight the next day, and that got him on schedule [4].
Walker: stack exercise on daylight, and guard the first half of the night
Walker says little about evening training in this conversation, but his own routine points the same way as the others'. He chose his gym for its large east-facing windows so he can cycle in morning light, stacking exercise and daylight as two wake-up cues for his circadian clock [5].
Walker's larger contribution is the reasoning for why a late, stimulant-assisted session is costly. He explains that caffeine blocks the receptors for adenosine, the chemical that builds up the longer we are awake and creates sleep pressure [5]. Caffeine's half-life is about five to six hours and its quarter-life 10 to 12, so his rule of thumb is to stop roughly 8 to 10 hours before bed [5]. Even people who fall asleep and stay asleep after an evening espresso can lose up to 30% of their deep sleep, a drop he compares to aging 10 to 12 years [5]. As he puts it, "the dose and the timing makes the poison" [5].
He also explains what is at stake when a late session pushes bedtime back. Early sleep cycles are dominated by deep non-REM sleep and later cycles by lighter sleep and REM, so a short night doesn't shrink everything evenly: go to bed very late and you miss much of your deep sleep [5]. And he gives the general principle behind every wind-down routine: falling asleep is "much more like landing a plane" than flipping a switch [5].
Huberman's plan for the person who can only train at night
A listener named Anthony put the hard case to Huberman directly: he lifts late at night because of work and goes to bed about an hour and a half after he finishes [3]. He wanted a pre-workout that wouldn't hurt his sleep [3].
Huberman starts by declining to treat the workout's stress response as the enemy. Strength sessions of moderate to high intensity will raise cortisol well above its baseline late in the day, and he says that is necessary: "We don't want to avoid. that high cortisol level during these workouts. That's part of the stimulus that's going to induce the adaptations that we want" [3]. Ideally cortisol is high in the morning, but if you can't train early, the real question is how to generate enough alertness to train hard without the tool most people reach for [3]. Caffeine is out, because taken 8 to 10 hours before sleep it disrupts sleep even if you can fall asleep [3].
His plan has three parts.
Before. His supplement suggestion is Alpha-GPC at 600 to 900 milligrams with water, which raises acetylcholine for focus without being a classic stimulant and may modestly increase REM sleep [3]. Because it can raise TMAO, which carries some cardiovascular risk, he suggests pairing it with 600 milligrams of garlic and limiting use to one to three times a week; its effect also fades with daily use [3]. He puts more weight on something free: arriving rested and mentally committed. "I think we vastly underestimate the extent to which just getting your mind in the right frame can help you generate the kind of intensity that you need," he says, noting that most people drift into the gym looking at their phones [3]. He saw the difference training with six-time Mr. Olympia Dorian Yates, who treated it as training, not just working out [3].
After. The aim is to bring arousal down on purpose. Even after cortisol has tripled or quadrupled, he says, "you can bring them down deliberately using long exhale breathing, nice hot shower" [3]. A few physiological sighs or long exhales slow the heart through the vagus nerve [3]. The shower should be hot: "It's not like a cold shower, which is stimulating," and a hot shower helps core body temperature drop afterward [3].
Food. Huberman acknowledges the standard advice not to eat in the two or three hours before sleep, then qualifies it: "being super hungry and waking up in the middle of the night because you're hungry from a really hard workout, that also will mess up your sleep" [3]. He has woken at 3 a.m. after a late session and ended up eating oatmeal [3]. So he suggests eating something like Greek yogurt, casein or oatmeal after the workout [3].
He closes by saying that no one does all of this perfectly, and doing some of it still helps [3].
The GIST of every new summary in your inbox, daily or weekly. Free, and you can unsubscribe any time.
Where They Agree, and Where They Don't
Agreement. All of them treat exercise as good for sleep and none treats it as timing-neutral [1][2][4][5][6]. Morning is the favoured slot for those who can choose: Hattar and Walker both train then, and Huberman explains why it reinforces the clock [4][5][6]. Hard sessions close to bed are the risk, on Huberman's reading of the research, Galpin's sleep studies with athletes and Hattar's own experience [1][2][4]. Caffeine near a late session is ruled out by Huberman and Walker on the same 8-to-10-hour figure, and Huberman is stricter still in his deep-sleep answer, where he says at least 8 and ideally 12 hours [1][2][3][5]. A deliberate wind-down after training is common ground between Galpin and Huberman [1][3]. And everyone leaves room for the individual: Huberman calls his windows opportunities, Hattar calls his schedule his own [4][6].
How strict is the six-hour rule? This is the main tension, and it sits inside Huberman's own statements. He cites six hours as the guideline, yet he says evening training beats none, tells busy people to train whenever they can, and gives a full protocol to a man who lifts 90 minutes before bed without telling him to stop [1][2][3][6]. The reason for both positions is the same priority he states elsewhere: "optimization has to meet those real life issues, not the other way around" [3]. The six-hour line describes the conditions under which the slow-wave benefit was shown; it does not show that later training is worse than skipping [2].
How many people does late training hurt? Huberman says intense late exercise can reduce slow-wave and REM sleep for many people in one episode and that "some people" have trouble sleeping after it in another [2][6]. Galpin's athletes and Hattar are cases where it clearly did [1][4]. No source gives a number, and Huberman's stress on individual variation suggests the honest answer is that you have to test it on yourself [6].
Is temperature the mechanism? The sources pull in different directions. Huberman calls temperature the effector of the circadian rhythm and says raising body temperature after about 8 p.m. delays the clock, and Hattar suspects body heat as one reason his evening workouts backfired [4][6]. But in the slow-wave study Huberman describes, the researchers found little change in core body temperature, so temperature did not explain the benefit, which seemed to come from the fine structure of the brain waves [2]. These are not flatly contradictory, since one concerns how well-timed exercise improves deep sleep and the other how badly timed exercise delays sleep, but the sources do not reconcile them.
Eat or fast before bed? In his deep-sleep answer Huberman says avoiding food for about two hours before sleep increases early-night growth hormone and deepens slow-wave sleep [2]. For the late lifter he says to eat [3]. He resolves it himself: going to bed too hungry can also ruin sleep, and "it's better to make sure that you're getting to sleep than it is to avoid food" [2].
Why It Works
Exercise deepens slow-wave sleep directly. In the study Huberman cites, an hour of moderately hard cardio improved slow-wave sleep on EEG by increasing its stability, without a meaningful change in core temperature [2]. Galpin's figure of 30 or more minutes a week near maximum heart rate points to the same link between hard effort and deep sleep [1].
Exercise is a time cue. Huberman describes exercise as a non-light signal that can shift the clock, with an anticipatory circuit that forms after a few days of training at the same hour [6]. Hattar's model treats exercise, meals and light as inputs that have to be in the right phase with one another [4]. Morning exercise plus morning light gives a larger wake-up signal than either alone [5][6].
Temperature carries the clock's signal. Body temperature is lowest around 4 a.m., rises after waking and peaks between about 4 and 6 p.m. [6]. Huberman says "temperature is actually the effector of the circadian rhythm," and that raising temperature after roughly 8 p.m. tells the body the day is still going [6]. Hard exercise heats the body, which is one reason Hattar suspects his evening sessions pushed everything later [4]. It also explains the hot shower: Huberman finds that a hot shower, hot tub or sauna late at night drops his temperature afterward and helps him sleep [3][6].
Hard training is a stress response. A strength session spikes cortisol, which Huberman describes as running in opposite phase to melatonin: high in the morning, low in the evening is the pattern that sets up natural melatonin release and easier sleep [3]. A late session puts a cortisol peak where the low should be [3]. Exercise also has what he calls pro-arousal effects, opening a window of one to six hours of better focus, which is welcome at 7 a.m. and unwelcome at 10 p.m. [3]. Long-exhale breathing works against this by slowing the heart through the vagus nerve [3].
Gym lighting counts as light. Hattar names bright gym lights as a suspect [4]. His field's finding is that the eye's clock-setting cells measure intensity whether or not we notice, and that most people get far too much light at night [4]. Huberman advises avoiding bright light between roughly 10 p.m. and 4 a.m. and notes that sensitivity to light rises sharply in the evening [6].
Caffeine hides sleep pressure and thins deep sleep. Walker's account is that caffeine blocks adenosine receptors without removing the adenosine, and that with a quarter-life of 10 to 12 hours an afternoon dose is still active at bedtime, where it can cost up to 30% of deep sleep even in people who sleep through [5].
The deep sleep you lose is front-loaded. Because slow-wave sleep is concentrated in the first half of the night, anything that delays or disturbs the start of sleep falls on the stage that handles growth hormone release and tissue repair, which is the stage a hard-training person most needs [2][5].
Where It Applies, and Where It Doesn't
The six-hour guideline is about moderate-to-intense work. Low-intensity exercise is exempted in Huberman's own wording, so an evening walk or easy session is a different matter [1][6].
The supporting study used cardio at one intensity for one duration. Its extension to lifting is Huberman's inference [2]. The benefit also did not show up in how participants felt, so don't expect to notice it the next morning [2].
The three performance windows are tied to waking time, not clock time, so they move with your schedule. Someone who wakes at 6 a.m. reaches the 11-hour window at 5 p.m.; whether that clears six hours before bed depends on when they sleep [2][6].
Chronotype matters. Huberman notes that only about 20% of people are early birds and that "most everybody has the ability to stay up later than we would prefer to," while getting going earlier than normal is hard [3]. Hattar's 4:30 a.m. schedule is an early type's solution, and he says so [4]. Hattar also cautions that it is unclear how much of being a night owl is intrinsic, since many late risers shift once they get morning light [4].
The Alpha-GPC suggestion is limited by its own caveats: one to three times a week, paired with garlic because of the TMAO concern [3]. It answers one listener's situation and is not a general recommendation to supplement.
Tracker readings of deep sleep are estimates, Huberman warns, since consumer devices infer stages from heart rate and movement where sleep labs use EEG [2]. Use them to spot a trend after changing your training time, not as a verdict on a single night.
Finally, timing is not the whole story. Hattar's point is that exercise is one input among several, and light should be fixed first [4]. A perfectly timed workout will not rescue sleep that caffeine, alcohol or bright evenings are undermining [2][4][5].
Anyone with a heart condition, a sleep disorder or persistent insomnia should get a doctor's advice before changing training intensity or adding supplements.
What To Do With It
If you can choose, train in the morning and add daylight. Walker cycles by east-facing windows; Huberman says light and exercise together give a bigger wake-up signal; a few consecutive days at the same hour builds a circuit that makes waking easier [5][6].
Otherwise, use the waking-time windows. Try about 30 minutes, three hours or 11 hours after waking, and treat them as options to test [6].
Finish hard sessions at least six hours before bed when your life allows it. That is the condition under which an hour of moderately hard exercise improved slow-wave sleep [2].
Get some weekly work near your maximum heart rate, early in the day. Galpin's figure is 30 minutes or more a week in the top 10% of heart rate for better deep sleep, provided it isn't close to bedtime [1].
If the evening is the only time you have, train anyway. Huberman and Galpin both rank consistency above ideal timing [1][6]. Where you can, put the hardest sessions, such as intervals, on days when you can train earlier; removing 8 p.m. intervals was the fix for some of Galpin's athletes [1].
Keep caffeine out of late sessions. Stop 8 to 10 hours before bed at a minimum [1][3][5]. Supply the intensity by arriving rested and focused, with your phone away [3]. Alpha-GPC with garlic, no more than three times a week, is Huberman's occasional alternative [3].
Cool down in proportion to the session. End with slow breathing, longer after harder work, and use long exhales or physiological sighs to slow the heart [1][3].
Take a hot shower, not a cold one. Heat relaxes you and lets core temperature fall afterward; cold is stimulating [3].
Eat something modest afterward. Greek yogurt, casein or oatmeal, so a hard session doesn't wake you hungry at 3 a.m. [3].
Keep a simple log for a few weeks. Huberman suggests noting when you wake, get light, eat and exercise, changing one or two variables at a time [6]. If you sleep your normal hours and wake unrested, look at the intensity of the previous two or three days; if no amount of sleep is enough, look at volume [6]. If poor nights pile up, switch to restorative sessions until they pass [1].
Sources
- Dr. Andy Galpin: Optimize Your Training Program for Fitness & Longevity · Huberman Lab
- AMA #2: Improve Sleep, Reduce Sugar Cravings, Optimal Protein Intake, Stretching Frequency & More · Huberman Lab
- Huberman Lab Q&A: Late-Night Pre-Workouts, Morning Light, Memory, Fertility, Menopause and Finding Your Passion · Huberman Lab
- Dr Samer Hattar Timing Light Food Exercise For Better Sleep Energy Mood · Huberman Lab
- Dr. Matt Walker on Perfecting Your Sleep: Sleep Stages, Caffeine, Alcohol, Supplements, Naps and Unconventional Tips · Huberman Lab
- Using Science to Optimize Sleep, Learning & Metabolism · Huberman Lab