Sure exercise is great for muscle building, but so is eating. Really. You may not feel like eating right after you work out, but that’s when you need to refuel the most. And to increase and maintain your musculature, you should carefully time your meals with your exercise sessions.  

Here’s why: When you exert yourself, you deplete glycogen—the sugars stored in muscle tissue and the source of energy—and the first place your body looks to replenish glycogen is from your muscles, the same bank account your workout just withdrew from. So to rebuild muscles rather than further deplete them, it’s important to restock the sugars, especially to avoid feeling weak or irritable. 

While protein helps rebuild muscle, carbohydrates restore glycogen, according to Jim White, a sports trainer and spokesperson for the Academy of Nutrition and Dietetics of American College of Sports Medicine. If you’re not getting both “you’re cheating yourself of muscle recovery and growth,” he says. (Fat, on the other hand, slows down digestion, delaying the absorption of nutrients, so you don’t need fats post-workout.) But when you refuel is also key. Most fitness experts agree that there’s a 60-minute window after a workout for getting some food in your system before muscles are sabotaged (though some say it’s more like 30 to 45 minutes). 

Of course, the intensity of your workout is a factor, too. “If you take a walk with the dog or a restorative yoga class, you aren’t likely to deplete all your glycogen,” says Pamela Peeke, MD, a triathlete and author of Body for Life For Women. So when you eat is less of an issue. “But after a moderate to high intensity workout—a hard spin class, 45 minutes on the elliptical, a fast five-mile run—refueling within the hour is important.” 

But should you also eat before a workout? While it depends on your schedule and conditioning, an empty stomach may cause you to tire more easily. If you exercise in the afternoon or evening, you have plenty of time during the day to fuel up. Eat lunch at 2, allow a couple of hours to digest, and you’re good to go for 6 o’clock kickboxing. But say you’re a morning exerciser—you wake up and run out the door, literally?  You may not want, or have time for, anything but a sip or two of coffee.  Early birds can usually get away with just that, especially if your body is used to running on empty for a short while, says Peeke.  

White agrees and adds that you shouldn’t go more than 12 hours without eating before you hit the gym. “If you had a substantial dinner with protein and carbs the night before, you should have enough fuel in your system to go the distance without flagging,” he says. Fuel up before a longer workout, like a two-hour hike or bike ride, and if you find that you tire in the middle of a treadmill workout or TRX class, he suggests getting in a few bites of yogurt or half a banana beforehand. Not only will the calories keep you energized, he says, they’ll help start the beta-oxidation process—the fat burning.  

Whether you eat before working out or after—or both—you don’t want to take in more calories than you expend. Think small portions, recommends Peeke: Half a protein bar, some peanut butter on an apple slice, chocolate milk, a bowl of berries, a hardboiled egg. “You don’t see runners loading up after a race. At the finish line of a half-marathon, they’re offered bananas and orange slices,” she says.  

The key takeaway: Don’t skip. “A lot of women will walk out of spin class and not eat for the rest of the day, which is the worst approach. Your body will cannibalize your muscles and slow down your metabolism,” Peeke says. That simply undoes all the good you’ve done. Instead refuel and then keep your metabolism revved by staying active throughout the day—walking instead of driving, stairs over elevator—and you’ll continue to burn calories. As she puts it, “Once you’ve built your fire, keep stoking it.”