We are a culture that loves our coffee jokes, but we all know there’s a little truth in humor. We cling to our caffeine because we are not getting enough rest at night. According to the Centers for Disease Control and Prevention, more than one-third of Americans get less than the recommended seven hours of sleep – putting them at greater risk for obesity, diabetes, and heart disease.

So what can we do? We can lace up our sneakers and hit the gym.

It’s a long-held belief that a more active lifestyle leads to a better night’s rest, but it seems now there’s science to back it up.

Get More Sleep

First and foremost, exercise helps right off the bat by simply getting you to fall asleep.  You’ve used a lot of energy in that workout so you’re naturally more tired at the end of the day. Researchers at Northwestern University’s Feinberg School of Medicine recently discovered that when implementing an aerobic exercise routine after 16 weeks, subjects were sleeping as much as an extra 1.25 hours more per night than those who were not exercising. A consistent routine may also help get your circadian rhythms back on track by promoting daytime alertness and balancing out the body’s need for sleepiness at night.

Get Better Sleep

Regular physical activity can contribute to better sleep quality. Studies have indicated that working out during the day may stimulate longer periods of “slow-wave sleep.” This is the deepest and most restorative stage of the nightly sleep cycle.

In fact, a study in the journal Mental Health and Physical Activity cited that men and women from ages 18-85 who got the recommended amount of moderate to vigorous activity a week (150 minutes) saw a 65% improvement in the quality of their sleep.

Feel Calm

Stress is as much a part of American lives as apple pie and Facebook. Seven out of ten adults in the US say they are stressed or anxious on a daily basis. According to a recent online poll taken by the Anxiety and Depression Association of America (ADAA), around 14% of people use regular exercise to cope with stress.

During physical activity your body produces endorphins. These are chemicals in the brain that act as natural painkillers and mood elevators. They also greatly improve the ability to sleep and reduce stress. Regular aerobic exercises have been shown to decrease overall levels of tension, elevate and stabilize mood, improve sleep, and improve confidence.

It doesn’t have to be a Crossfit session or an hour of sweltering hot yoga. Just five minutes of aerobic exercise can stimulate some anti-anxiety effects.

Reduce Chronic Sleep Problems

Now we’re getting into some uncharted territory. Not much research has been done on the effects of exercise on chronic sleep disorders, but some conclusions can be drawn from what we do have.

While the exact science isn’t known, there are many theories as to why exercise may help reduce sleep problems like insomnia. One is that at nighttime your core body temperature should drop one to two degrees. This drop in body temp helps you fall and stay asleep. When you exercise your core body temperature increases, and the rapid drop in body temperature that follows is said to result in deeper sleep.

There is also something to be said about the stress reduction and circadian rhythm reset that occurs. For those with insomnia related to the timing of their body clock, exercise may help set things straight.

It’s important to note that the effects of exercise won’t necessarily kick in the night after you get that gym membership. The study out of Northwestern suggests that exercise may not have an immediate impact, but may take several weeks or months to significantly change sleep.

That’s not a reason to give up. Keep working out and while you’re trying to cultivate a better night’s sleep, make sure you’ve created the ultimate restful environment for your bedroom. Are your sheets soft enough? Are your pajamas cozy? Does your mattress support the way you sleep?

Studies also indicate that, on the flip side, a poor night’s sleep can negatively impact your workout the next day. Make sure you are getting your best night’s sleep each and every night.

If you frequently experience restless nights, take a look at your sleep health from a holistic point of view. Is your mattress is providing proper support? Are you drinking caffeine too late in the day? If you are struggling to get quality sleep every night, you may consider talking to your primary care physician.