When it comes to self-care, most of us are familiar with the basics: At a minimum, we’ve got to eat well, exercise often, and enjoy plenty of sleep if we want to feel good in body and mind.

While we might think of these as three distinct categories—diet, exercise, and sleep—more and more research suggests they’re all intertwined. When and what we eat can impact sleep quality, and the same is true for how and when we exercise. So if you’re looking to improve your sleep, consider making the following tweaks to your physical fitness routine.

Aim to work out on most days of the week.

A consistent exercise routine is linked with improved sleep overall. On the other hand, research suggests there’s a correlation between not exercising and suffering from poor sleep.

Studies have found that aerobic exercise, in particular, may help improve sleep quality—perhaps in part because it has an anti-anxiety effect. You don’t have to be a marathoner or professional athlete to enjoy these effects. Even a daily 30-minute jog or brisk walk can get your heart rate up and increase the odds that you’ll enjoy better sleep.

The key here is consistency. While you may sleep better after exercising on a single day, the sleep-promoting benefits of moderate aerobic exercise may have the greatest impact over time. So if you want better sleep, it’s a good idea to commit to an exercise routine over the long haul.

Embrace moderate exercise at any time of day (including evenings).

For a long time, most sources agreed that everyone should avoid physical activity in the hours leading up to bed. This was based on the idea that exercising too close to bedtime might have an energizing effect that would make it harder to fall asleep.

But a new review suggests participating in moderate physical activity within the four hours leading up to bedtime (and even as close as 30 minutes before bed) might actually increase the amount of time that people spend in slow-wave sleep and REM sleep, both of which are essential for overall wellbeing.

Of course, every person is different. But so long as exercise doesn’t seem to keep you up after working out in the evening, go ahead and give moderate nighttime exercise a try.

Avoid vigorous exercise in the hour or so before bed.

Here’s the one exception to the “exercising in the evening is actually okay” rule: Engaging in vigorous exercise (think high-intensity interval training, for example) within an hour of bedtime may have a deleterious effect on sleep.

That’s because body temperature rises significantly during vigorous exercise, and the body needs to cool down before sleep can occur. An hour may not be enough time for this cool-down period after vigorous activity, so plan to perform more intense workouts earlier in the day.

Choose workouts that are linked to better sleep.

As noted above, 30 minutes of moderate aerobic exercise on most days of the week is associated with sustained improvements in overall sleep quality. But this isn’t the only type of exercise that may promote better sleep.

For instance, strength training in the morning may help people fall asleep faster, while an evening strength training routine might improve sleep quality. And perhaps not surprisingly, a gentle evening yoga routine can help relieve anxiety and physical tension, thereby easing you into sleep.

While these tips hold true for the general population, it’s important to remember that every body is different. It’s a good idea to experiment with different strategies until you’ve found the ideal exercise routine for obtaining your body’s best sleep.