Does Exercise Help Insomnia? What the Science Says

Exercise is one of the most effective non-drug treatments for insomnia. Regular physical activity helps you fall asleep faster, stay asleep longer, and improves overall sleep quality. As Charlene Gamaldo, medical director of the Johns Hopkins Center for Sleep, puts it: “We have solid evidence that exercise does, in fact, help you fall asleep more quickly and improves sleep quality.” The benefits can show up surprisingly fast, with some people noticing better sleep the same night they work out.

Why Exercise Makes You Sleepy

Two biological shifts explain most of the sleep benefit. First, physical activity increases levels of adenosine in the brain. Adenosine is the same compound that builds up naturally throughout the day and creates that familiar pressure to sleep by evening. Caffeine works by blocking adenosine receptors, and exercise does the opposite: it accelerates adenosine buildup, making the drive to sleep stronger.

Second, exercise raises your core body temperature, which then drops over the following hour or so. That post-exercise cooling mimics the natural temperature decline your body uses as a cue to initiate sleep. The combination of higher adenosine and a falling body temperature creates a potent signal that it’s time to wind down. High-intensity exercise amplifies both of these effects.

How Exercise Resets Your Internal Clock

Beyond the immediate fatigue it produces, exercise also shifts your circadian rhythm, the 24-hour cycle that determines when you feel alert and when you feel drowsy. Research published in the Journal of Physiology mapped out exactly when exercise nudges the clock forward or backward. Morning exercise around 7:00 a.m. and afternoon exercise between 1:00 and 4:00 p.m. both shift the clock earlier, making it easier to fall asleep at night. Evening exercise between 7:00 and 10:00 p.m., on the other hand, pushes the clock later, which can delay sleep onset.

If you’re someone who lies awake past midnight unable to fall asleep, morning or early afternoon workouts may help pull your sleep window earlier over time. This isn’t just about being tired from the workout. It’s a genuine recalibration of the hormonal signals that control your sleep-wake cycle.

When to Stop Exercising Before Bed

Timing matters more than most people realize. A large study published in Nature Communications tracked exercise timing against sleep outcomes and found a clear threshold: exercise that ends four or more hours before your usual bedtime has no negative effect on sleep. Closer than that, problems start to emerge, and the harder you exercise, the worse they get.

Working out at maximum intensity two hours before your usual bedtime delays sleep onset by about 36 minutes compared to light exercise at the same time. If you push that to exercising right around bedtime, the delay stretches to 80 minutes. Sleep duration takes a hit too. Maximal exercise two hours before bed shortens total sleep by about 22 minutes, and exercising at bedtime cuts it by nearly 43 minutes.

Light exercise is more forgiving. A gentle walk or easy stretching within a few hours of bed doesn’t cause the same disruption. The practical takeaway: if you can only exercise in the evening, either finish at least four hours before you plan to sleep or keep the intensity low.

Cardio, Strength Training, or Both

Both aerobic exercise and resistance training improve sleep, and neither is dramatically better than the other overall. A clinical trial comparing the two in older adults with sleep problems found significant improvements in sleep quality scores for both groups. However, the details favored strength training on several specific measures. The resistance training group saw greater improvements in how quickly they fell asleep, how long they stayed asleep, and their sleep efficiency (the percentage of time in bed actually spent sleeping).

The aerobic group had an edge in one area: social well-being, likely because cardio-based group classes tend to involve more interaction. From a pure sleep perspective, though, lifting weights or doing bodyweight resistance exercises is at least as effective as running or cycling. If you dislike cardio, this is good news. Pick whatever form of exercise you’ll actually stick with.

Mind-Body Exercise

Tai chi and yoga offer a different angle. A meta-analysis found that tai chi produced a larger improvement in sleep quality than conventional exercise training in people with chronic conditions. The effect size for tai chi was nearly double that of general exercise programs. The likely explanation is that these practices combine physical movement with breathing regulation and mental focus, addressing both the physical and psychological sides of insomnia. If racing thoughts keep you awake more than physical restlessness, a mind-body practice may be especially useful.

How Much Exercise You Need

You don’t need to train like an athlete. Thirty minutes of moderate aerobic exercise is enough to produce measurable improvements in sleep quality, and for some people, the effect is noticeable that same night. “Moderate” means your heart rate is up and you’re breathing harder, but you could still hold a conversation. A brisk walk, a bike ride, or a swim all qualify. So does an active yoga class or a session with weights.

Consistency matters more than any single workout. The circadian-shifting benefits build over weeks of regular activity. One hard gym session won’t cure chronic insomnia, but a habit of moving your body most days creates a cumulative effect on sleep architecture that deepens over time.

When Exercise Makes Sleep Worse

There is a point where more exercise backfires. Overtraining syndrome, which develops when training volume or intensity outpaces recovery, lists insomnia as a core symptom. Early signs include muscle soreness that doesn’t resolve, unexpected weight changes, increased anxiety, and waking up feeling tired despite a full night in bed. As it progresses, full-blown insomnia can set in.

The hallmark of overtraining is a drop in performance that persists even after rest. If you’re exercising regularly and your sleep is getting worse rather than better, especially alongside lingering fatigue and frequent minor illnesses like colds, you may be doing too much. Pulling back on volume or intensity for a week or two typically resolves it. The goal is to stress the body enough to trigger those helpful adenosine and temperature changes without overwhelming your recovery capacity.

Putting It Together

The strongest approach combines a few principles. Exercise most days of the week at moderate intensity for at least 30 minutes. Schedule workouts in the morning or early afternoon if possible, which aligns the circadian benefits with the acute fatigue benefits. If evening is your only option, finish four hours before bed or keep things light. Choose a type of exercise you enjoy, whether that’s running, weight training, swimming, or tai chi, because the best routine is one you maintain. And pay attention to the feedback loop: if more exercise is making sleep worse, scale back before pushing harder.