Standard sleep advice says you shouldn’t exercise moderately or vigorously within a few hours of bedtime. But most studies have found that early evening exercise does not impair sleep quality.
According to an analysis of 23 small studies, published in Sleep Medicine in 2019, exercising in the evening is unlikely to impair sleep in most people, unless they do it vigorously during the hour before bedtime. The analysis, which included 275 healthy people (average age 29, generally good sleepers), found negative effects on sleep quality and quantity only when vigorous exercise was done within an hour of bedtime. In contrast, moderate evening exercise, even when done shortly before bedtime, had no adverse effects on sleep overall and, in fact, may have had some small benefits.
Exercise has a variety of potentially sleep-impairing and sleep-enhancing effects on the body. Notably, it can raise heart rate, body temperature, and alertness, which, if they remain elevated, could interfere with sleep. On the other hand, exercise can help promote relaxation and reduce anxiety, a plus for sleep.
Keep in mind that the effects of exercise on sleep vary from person to person and depend not only on fitness level and sleep problems (if any), but also on the type, length, timing, and intensity of the workout. Older people may be more likely to be affected by evening exercise. If you think evening exercise is interfering with your sleep, see if earlier workouts are better for you.