In many cases, hitting the gym after the sun’s gone down is more out of necessity than personal preference—but working out at night does have some perks. First of all, the gym is usually much less crowded than it is earlier in the day, which means you never have to wait for the squat rack or dodge the resident weight room chatterbox. Not to mention, breaking a sweat and flooding your body with endorphins feels just plain good after a stressful day.
However, if you’re going to work out at night (especially late at night), there are a few things to be mindful of so you can transition into a restful night’s sleep. Abide by these evening workout do’s and don’ts to make the routine work for you.
Don’t: Go TOO Hard Before Bed
If you’re doing a late-night workout and plan to go to bed right after, it’s probably best to avoid HIIT. According to a 2019 systematic review and meta-analysis, working out at night can improve sleep—as long as you keep the intensity low for at least an hour before bedtime, points out dietitian Kim Yawitz, R.D., owner of Two Six Fitness in St. Louis, MO.
When you have a higher-intensity session in mind at night, just make sure you’ve got at least a couple of hours between when you wrap up your workout and when your head hits the pillow. Otherwise, Yawitz suggests sticking with walking or yoga.
Read More: How to Strength Train for Cardio Benefits
Do: Consider a casein supplement
Whey protein is obviously a popular post-workout supplement among strength athletes—but if you work out at night, Yawitz recommends opting for slower-digesting casein instead. While you snooze, casein basically provides your body with a steady stream of fuel to recover and grow. In fact, studies suggest that taking 40 to 48 grams of casein 30 minutes before bed is an effective post-workout strategy for increasing muscle strength and exercise performance.
Don’t: Take a Pre-Workout With Caffeine or Other Stimulants
Not all pre-workouts contain caffeine, but some formulas pack in more of the stimulant than four cups of coffee, Yawitz says. And while that might not be a problem if you’re hitting the gym during the morning rush hour or at lunchtime, it’s definitely less than ideal in the evening.
(Caffeine content, by the way, may be one of the reasons why you need to try a new pre-workout.)
You see, caffeine—which is notorious both for boosting workouts and impacting sleep—has an average half-life of five hours. This means that if you take a pre-workout with 200 milligrams of caffeine at 6 p.m., you could potentially still have 100 milligrams of slumber-disrupting caffeine in your system at 11 p.m., Yawitz explains. Not an ideal equation for drifting off into dreamland with ease.
In addition to caffeine, you might also want to avoid other popular stimulants, such as yohimbe, theobromine, and glucuronolactone, which can also keep you up at night, says The Vitamin Shoppe nutritionist Brittany Michels, M.S., R.D.N., L.D.N. C.P.T.
Instead, Michels recommends choosing a non-stim pre-workout that emphasizes ingredients such as nitric oxide precursors (l-citrulline and l-arginine), betaine anhydrous, B vitamins, CLA, l-carnitine, beta-alanine, creatine, BCAAs, and/or glutamine.
Even then, pay close attention to your post-workout energy levels, she suggests. Some people are more sensitive to the vasodilating effect of nitric oxide precursors, stimulant-like effect of beta-alanine, and energy impact of B vitamins. “If you notice more difficulty getting down at night or less restful sleep, then evaluate pre-workout ingredients and dosages,” she says. You might want to cut down on or eliminate certain star players.
Do: Eat to fuel recovery (but not mess with sleep)
When possible, consume your last full meal for the day prior to working out—and preferably about two hours before hitting the gym, Michels says. This ensures that chowing down on a huge meal late in the evening doesn’t leave you restless overnight.
If your schedule doesn’t allow for a full meal prior to your evening workout, aim for a snack about 30 to 45 minutes prior so that you don’t feel overly hungry post-workout, Michels says. Good options: Fruit or rice cakes, both of which offer quick-digesting energy.
This way, you can stick with lighter post-workout recovery fuel, such as a protein shake or smoothie that contains protein powder. (This is where that casein, or another staged-release protein, comes in!) The goal here is to get enough nutrition into your body to promote recovery (and keep you from waking up in the middle of the night hungry) without going overboard. Finding your personal sweet spot ensures you reap the benefits of your training and sleep like a baby.
Do: Stretch before bed
After a workout, you should always engage in cooldown activities like stretching, says personal trainer Anthony McCulloch-Howard, C.P.T. “This is especially important with nighttime workouts because going to bed and lying motionless is more likely to leave you extra sore in the morning,” he says. Plus, in addition to helping your muscles transition from “work mode” to “rest mode,” a few minutes of stretching also slows down your mind—another major plus before bed.