Do you prefer waking up early to start your day with a workout, or relieving the day’s stress by hitting the gym after work? Fitting in exercise when you like is ideal, especially with the numerous benefits that working out can have, from lowering colorectal cancer risk to extending your lifespan. Getting in the recommended 150 minutes of exercise per week can also help lower your risk of over 200 diseases.
But for end-of-day exercisers, those workouts could be impacting another crucial part of your health: sleep quality.
“Evening exercise—particularly involving high levels of cardiovascular strain—may disrupt subsequent sleep, resting heart rate, and heart rate variability, thereby impairing a critical stage of the recovery process,” said Elise Facer-Childs, lead author of a new study that was published on Apr. 15 in Nature Communications.
The study’s researchers, out of Monash University in Melbourne, Australia found that exercising within four hours before bedtime was linked to falling asleep later, getting less and worse quality sleep, and having a higher resting heart rate and lower heart rate variability (the time gaps between each heartbeat). The findings were especially pronounced for higher intensity workouts in the evening, like HIIT (high-intensity interval training), a soccer game, or a long run.
Researchers looked at an international cohort of 14,689 people monitored across one year resulting in four million nights of data. Participants wore a fitness monitor (WHOOP Strap) to record exercise, sleep, and cardiovascular data.
The relationship between sleep and exercise
Previous research has found that exercise improves sleep quality, and could even help remedy sleep disorders like insomnia. A study from earlier this year explained that exercise boosts melatonin production, the hormone responsible for regulating sleep cycles, in addition to helping you fall asleep faster.
While some research indicates that evening exercise does not interfere with sleep at all, the authors of this study point out that previous findings were less conclusive.
“These studies have relied on small sample sizes and laboratory settings, and rarely involved exercise bouts that elicit substantial cardiometabolic demand on the body, calling into question the external validity of such findings,” said co-author Josh Leota.
“Intense exercise in the evening can keep the body in a heightened state of alertness, which is why public health guidelines have previously advised against working out too close to bedtime,” he added.
Sleep also plays a vital role in helping you recover better not only for your next workout, but also to stave off injury risk and improve workout performance. Research on sleep and athletic performance has found that poor quality sleep can impair muscle strength and endurance, while increasing risk of injury and inhibiting injury recovery.
Poor sleep is tied to faster brain aging, decreased cognitive functioning, worsened mental health, and a suppressed immune system.
Researchers also observed a lower heart rate variability among people who exercised close to sleeping, which has been linked with shorter lifespan, obesity, cardiovascular disease, inflammation, poor mental health, and worsened immune health. They also noticed evening exercisers had a higher resting heart rate, which indicates your heart has to work harder to pump blood to the rest of your body—meaning it is less efficient. High resting heart rate is associated with higher body weight, higher blood pressure, and lower physical fitness, according to the American Heart Association.
Leota said the new study’s findings suggested that if people were aiming to improve sleep health, they may benefit from working out at least four hours before going to bed.
Or, he said, “If exercising within a four-hour window of bedtime, people could choose brief low intensity exercises, such as a light jog or swim, to minimize sleep disruption and allow the body to wind down.”
For more on fitness:
This story was originally featured on Fortune.com