Although your iPod’s playlist of Queen’s and AC/DC’s greatest hits may be enough to help you power through your exercise routine, you might be surprised to learn that what you eat before, after and even during your workout can help maximize your time spent at the gym. Keep reading to find out what you should be consuming to ward off hunger and sustain your energy levels.

Before Your Workout

Whether your goal is simply to maintain your weight or gain muscle, planning out your meals before a workout can ensure that you successfully reach your fitness goals.

In order to ward off hunger and log more hours at the gym, plan on eating a little snack before heading out.

“Eating a little something before exercising is a great way to keep your energy up and your workout on track,” said Patricia Bannan, registered dietitian and author of Eat Right When Time Is Tight. “If you’re dragging or distracted by hunger, it is unlikely you will be performing at your best.”

Although you might be tempted to reach for a snack with a higher-fat content since fats offer more energy per gram, Bannan recommends choosing snacks that are a combination of carbohydrates and protein.

“The best snacks are mostly (about 65 percent) carbohydrates with some protein,” she said.“Since protein isn’t a fuel for exercise, you don’t want to overdo it. For carbs, aim for one large banana or a half bagel. For protein, try a tablespoon of all-natural peanut butter or a small cup of yogurt.”

Unlike protein and fats, carbohydrates are more easily digested by the body and can serve as an adequate fuel source, making them the ideal pre-workout snack.

“The logic behind carbohydrate consumption to fuel exercise has less to do with energy density (both carbs and protein have four calories per gram; fat has nine calories per gram), and more to do with digestion,” she said. “'Slow burning’ complex carbohydrates, such as fruits, vegetables, whole-grain bread, rice, pasta and cereals, are a good choice because they are digested easily and without the glucose spikes of simple carbs.”

In order to avoid discomfort while working out, keep portions small and be sure to give your body ample time to digest your food.

“If you are working out early morning, try having a small snack an hour or two before your workout,” said Tanya Zuckerbrot, registered dietician and creator of The F-Factor Diet. “If you are working out after lunch or dinner, make sure to wait three to four hours after eating a solid meal.”

During Your Workout

Whether you’re practicing yoga, running or weight-lifting, it is important to remain hydrated to prevent fatigue and keep performance levels up.

“Drinking water replenishes fluids lost through sweating, and having enough water in your system is vital for proper body function,” Zuckerbrot explained.

By just how much is enough? The American College of Sports Medicine recommends that during exercise, people start drinking early and at regular intervals to ensure they’re taking in fluids at the rate that they’re losing them.

“A common rule of thumb is to weigh yourself before and after exercising,” Zuckerbrot said. “For every pound of water weight you have sweated out, you should drink 16 ounces of water.”

Although sports drinks promise to replenish your body with electrolytes and other essential minerals lost through sweat, Zuckerbrot explains that these aren’t always necessary and can sometimes do more harm than good.

“One liter of most sports drinks contains anywhere between 240 to 300 calories and 60 to 70 grams of carbs, which is nutritionally equivalent to eating four slices of white bread,” she said. “If you are only spending a half hour at the gym, you may be ingesting more calories than you actually burned.”

So unless you’re planning on participating in high intensity activities, stick to water, which will replenish your body without adding any extra calories.

After Your Workout

Although watching what you eat before a workout is necessary to maximize your time in the gym, many people fail to realize that what you eat afterward is just as important.

“You burn a lot of calories post-workout, so it’s natural to experience an increase in appetite afterwards,” Zuckerbrot said. “Your body is prompting you to eat in order to rebuild its fuel stores, but if you’re not careful, you could end up eating more calories than you burned off during your workout, without actually nourishing yourself."

In order to ensure a quick recovery and restore the body’s depleted glycogen stores, it is important to consume a post-workout meal that contains high-fiber carbohydrates and protein.

“Beans and whole grains are excellent carbohydrate choices,” Bannan explained. “They contain small amounts of protein for energy and muscle repair, along with fiber, vitamins, and antioxidants.”

In addition to whole grains like oatmeal and brown rice, fruits and vegetables can also replenish energy stores and provide your body with essential vitamins and minerals.

But unlike your pre-workout meal, which should contain more carbohydrates than proteins, Bannan recommends that post-workout, you aim for snacks offering more protein.

“Protein helps your body to recover from the strain of the workout,” she added.

So after leaving the gym, reach for low-fat dairy products, which are not only good sources of protein but also contain other essential nutrients like vitamin D and calcium. Bannan also suggests consuming lean meats, which provide iron for oxygen transport to your muscles.

Although the consumption of healthy fats is essential to maintaining a balanced diet, they shouldn’t be a part of your post-workout meal since they can slow down the digestion and absorption of carbohydrates and protein.

“The same foods recommended for a healthful diet pertain to those working out – lots of fruits and vegetables, whole grains, lean proteins, low-fat dairy, and nuts and beans,” Bannan said. “The only difference is when you workout you want more carbs pre-workout and more proteins after.”