Terra

Integration

API
Unified API
SDK
SDK
Authentication
Authentication
Streaming
Streaming
Blood
Blood Report API
Planned Workout
Planned Workout
AI Interface
AI Interface

User engagement

Graph API
Graph API
Scores
Health Scores
Rewards
Health Rewards

Use cases

Enterprise
Enterprise
Insurance
Insurance

Developers

Wearable Data
Wearable Data
Community
Community
Documentation
Documentation

Learn

Blog
Blog
Podcast
Podcast
Events
Events
Reports
Reports

Company

Customers
Customers
Careers
Careers
Partners
Partners
Support
Support
Become an integration
Become an integration

Cookie Preferences

Essential CookiesAlways On
Advertisement Cookies
Analytics Cookies

Crunch Time: Embrace the Cookie Monster Within!

We use cookies to enhance your browsing experience and analyse our traffic. By clicking “Accept All”, you consent to our use of cookies according to our Cookie Policy. You can change your mind any time by visiting out cookie policy.

All papers
All papers

In this research paper:

  • 01Earlier Workouts Lead to Better Recovery
  • 02The Sweet Spot: 11-14 Hours
  • 03The Honest Takeaway
  • 04Summary questions

Sleep Series

Your Evening Workout Is Costing You Sleep

Does the timing of your workout actually affect your sleep? We ran the data to find the window that delivers the most benefit.


Faraaz Akhtar
Faraaz AkhtarAI and Health Researcher
·
Kyriakos Eleftheriou
Kyriakos EleftheriouCEO

May 19, 2026

Key takeaways

  • Later workouts mean worse sleep across the board — more time awake in bed, fewer REM events, higher sleep heart rate, and lower HRV. The closer to bedtime you train, the worse you recover.
  • The benefits plateau around the 10-hour mark — with the sweet spot sitting at 11-14 hours between workout and bedtime. Push your workout earlier and you capture most of the available benefit.
  • The effects are real but tiny — z-score shifts of 0.1-0.3 across most metrics. Earlier is marginally better, but consistency beats optimization: exercise whenever you'll actually do it.

A question we’ve tried to answer in the past is whether or not how much you exercise during the day affects how you sleep. We had pretty interesting results when we did this, notably that higher number of burned calories was linked with lower sleep heart rates, slightly higher HRV, and tiny changes in sleep duration or stages.

A common limiting factor of many large-scale investigations we run at Terra Research is that of confounding factors. Having access to data that belongs to real people living real lives is messy and doesn’t allow much space for control. 

These confounders are an artefact of this reality. Yet, as researchers, we recognize the importance of investigating these confounding factors. And so this is what we will do here, instead of just looking at how calorie burn affects sleep, this blog will attempt to look into how the timing of activity affects sleep.

To do this, we ran activity and sleep data from the same day through a model with fixed effects and terms for activity time, the activity-sleep gap, and the interaction between these terms. We looked at how the data we collected from users sleeps was affected by when they decided to exercise. This work only focused on cardiovascular exercises, specifically, biking (outdoor & stationary), walking, running (outdoor & treadmill), and hiking.

Earlier Workouts Lead to Better Recovery

There were a couple effects that were very clear (p < 0.05). The first had to do with time spent awake in bed. Both the linear model and the plot show that the later you exercise, the less time you spend awake in bed.

image (40).png
Figure 1: Time spent awake in bed based on the gap between activity time and bedtime. This is a small effect which is apparent by the error presented.

However, this is not an indicator that you sleep better. Despite taking longer to fall asleep, we found a increased number of REM events for activities done much earlier during the day.

image (41).png
Figure 2: REM event counting based on the gap between activity time and bedtime. Once again, this effect has a small magnitude. Gap distributions between plots can differ based on how much missing data was present for each sleep column.

Continuing on this theme that earlier activity was better for your sleep, we found that heart rate was lower when activity was done earlier during the day.

image (43).png
Figure 3: Sleep heart rate based on the gap between activity time and bedtime. Interestingly, this plot resembles a mirror image of the previous ones.

Since sleep is essential for recovery, we looked at HRV, which is one the best indicators for recovery.

image (44).png
Figure 4: RMSSD, a measure of your HRV or heart rate variability drops when you have a late workout.

With the drop in REM events as well as HRV, we once again reached the same result. Your recovery was better when you worked out earlier in the day.

Get the latest Terra Research reports and insights every week as soon as they're published.

By continuing, I agree to the Privacy Policy and Terms of Service.

The Sweet Spot: 11-14 Hours

At this point, our final result for the non-interaction term pretty much confirmed what we already knew.

image (45).png
Figure 5: Sleep efficiency is considerably higher when a workout is done earlier in the day. Sleep efficiency is calculate by dividing time spent asleep by total time spent in bed.

It should be noted that for many of these results, results were not linear throughout the day. In fact, it seemed to be specifically the 11-14 hour range that offered the most benefit, with most curves flattening once the 10-hour mark was hit.

We saw one significant effect worth reporting with the interaction term; temperature. The largest effect here was temperature by far, showing large drop during sleep when a workout was done for a long duration very close to bedtime. This matches with literature which suggest that body temperature drops when we sleep [1]. 

As exercise raises body temperature, it makes sense to see a large change in temperature when we go to bed very quickly after exercising for a long time. Literature also suggests that late night exercise “disrupt the normal nocturnal drop in core body temperature, which might disrupt sleep quality [2].”

The Honest Takeaway

Although all these effects are significant, I must also stress that most of these effects were tiny in magnitude. It is almost always better to live an active life than a sedentary one. As such, perhaps the most useful takeaway from such data is to exercise at whatever time you think will allow you to lead your healthiest life!

References

[1] Harding, Edward C et al. “The Temperature Dependence of Sleep.” Frontiers in neuroscience vol. 13 336. 24 Apr. 2019, doi:10.3389/fnins.2019.00336

[2] Alkhaldi, Eid H et al. “Effect of Nighttime Exercise on Sleep Quality Among the General Population in Riyadh, Saudi Arabia: A Cross-Sectional Study.” Cureus vol. 15,7 e41638. 10 Jul. 2023, doi:10.7759/cureus.41638

Summary questions

Does working out late actually hurt my sleep?
Yes, but subtly. Across the dataset, later workouts were associated with lower HRV (RMSSD), higher sleep heart rate, fewer REM events, and reduced sleep efficiency — all statistically significant at p < 0.05. The effects are small in magnitude, but they consistently point the same direction: earlier exercise produces better overnight recovery.
When is the best time to exercise for sleep quality?
The sweet spot is roughly 11–14 hours before bedtime. Most of the recovery curves — HRV, sleep heart rate, REM events, and sleep efficiency — flatten out after about a 10-hour gap, with the strongest benefits clustered in that 11–14 hour window. Practically, that means morning workouts if you sleep around 11 PM.
Why am I falling asleep faster after late workouts but still feeling unrecovered?
The data shows that later workouts reduce time spent awake in bed — you do fall asleep faster. But that same group shows fewer REM events, higher sleep heart rate, and lower HRV. Falling asleep quickly isn't the same as sleeping well; the recovery markers tell the real story.
Does exercising close to bedtime affect body temperature during sleep?
Significantly. The interaction between workout duration and proximity to bedtime produced the largest single effect in the model: long workouts done close to bedtime caused a sharp drop in body temperature during sleep. This disrupts the normal nocturnal temperature curve, which prior literature links to degraded sleep quality.
How much does workout timing really matter compared to just exercising?
Not much, honestly. While the timing effects were statistically significant, their magnitudes were small across every sleep metric measured. Being active at any time of day beats being sedentary — timing is an optimization on top of an already-good habit, not a make-or-break factor.
Can wearable data detect how exercise timing affects sleep?
Yes. By running same-day activity and sleep data through a fixed-effects model with terms for activity time, the activity-sleep gap, and their interaction, consumer wearable data picked up significant effects on REM events, sleep heart rate, HRV, sleep efficiency, and body temperature. No lab or polysomnography required.
Does cardio specifically affect sleep differently than other exercise?
This analysis focused exclusively on cardiovascular activities — outdoor and stationary biking, walking, outdoor and treadmill running, and hiking. Within that scope, earlier cardio consistently improved overnight recovery markers. Strength training and other modalities weren't included, so the timing rule here is specific to aerobic work.
Why does my HRV drop after a late workout?
Exercise raises core body temperature and sympathetic nervous system activity, both of which need time to return to baseline before sleep. When the activity-sleep gap is short, RMSSD drops measurably overnight — your nervous system is still in recovery mode rather than parasympathetic-dominant rest. Giving yourself more hours between the workout and bed lets HRV rebound.
Faraaz Akhtar
Faraaz Akhtar

Faraaz Akhtar is an AI & Health Researcher at Terra API, where he develops statistical and machine-learning methods to extract insights from large-scale wearable health data.

Kyriakos Eleftheriou
Kyriakos Eleftheriou

Kyriakos Eleftheriou is the Founder and CEO of Terra API.

next ventures
pioneer fund
samsung next
y combinator
general catalyst

The world's best health apps run on Terra data

ProductsIntegrations Authentication Mobile Development Documentation GraphAPI
DocumentationAPI SDK Quickstart
CommunityBlog Research Community Podcast Github
CompanyAboutCareersCustomersBecome an IntegrationCookies PolicyGDPRPrivacy PolicyTerms of Purchase
© Terra API. 2025 — All rights reserved.
Previous
Next

Continue reading

Is Parkrun a Better Measure of Fitness Than VO2 Max
Parkrun vs VO2 Max

Is Parkrun a Better Measure of Fitness Than VO2 Max

What does your everyday training data really reveal about your fitness? We analyzed 1,613 park runs to find out.

May 21, 2026

Does Watching Sports Inspire Us to Exercise?
Cycling

Does Watching Sports Inspire Us to Exercise?

Does watching professional cycling actually inspire us to ride? We analyzed ~265,000 outdoor cycling activities to test whether major race weekends produce a measurable spike in everyday riding.

May 14, 2026

What Actually Makes Us Dream?
Dreaming

What Actually Makes Us Dream?

Why do we remember some dreams and not others? We analyzed over 130,000 nights of sleep to find out what kind of nights, and days, make dream recall more likely.

May 12, 2026

Data Shows Most Runners Don't Actually Get Faster
Running

Data Shows Most Runners Don't Actually Get Faster

How do runners actually get faster? We analyzed 856,000 running activities to find out who actually gets faster. It wasn't the intense ones, but rather the consistent ones. Showing up month after month beat everything flashier. Boring, as it turns out, is fast.

May 7, 2026