A healthy lifestyle combines physical activity with a balanced diet. The effectiveness of a workout doesn't just depend on what you eat, but when you eat it. Make your workout work for you — learn what to eat before and after you hit the gym.

Early morning

When you first wake up, your blood sugar can be low because you haven't eaten all night. It's best to eat something light before exercising, keeping a few guidelines in mind. First, consider how long it will be before you start your workout and how long you plan to exercise. If you are planning to go for a light 30-minute walk, you may be able to get away without eating first. For more intense workouts, if you are working out within an hour or so, keep it light. Quickly digesting foods may be best so they do not sit in your stomach too long. Toast with a little nut butter, a piece of whole fruit, a glass of milk, or a sport drink may help get you going and still be digested before you work out. If you plan to go for an extended period of time, be sure to wake up so there’s time to eat enough food to support your workout. Oatmeal with nuts and dried fruit, a hard-boiled egg on a whole-wheat bagel or English muffin, or a fruit and Greek yogurt smoothie are some ideas to try a few hours before your extended workout.

Afternoon and evening

If you work out later in the day, have a snack before you exercise to improve performance if you haven’t eaten in a few hours. Christine Rosenbloom, a sports nutrition expert at Georgia State University, recommends carbohydrates and lean protein before a hard workout. Rosenbloom suggests eating whole fruits and vegetables for healthy carbs. Lean protein sources include chicken, low-fat cheese, cottage cheese, lean beef, and some fish, like salmon. Take the time to eat a balanced meal or snack a few hours beforehand so you have time to digest the food. Be sure to drink plenty of water a few hours before you exercise as well. It’s recommended to drink 17 to 20 ounces of water no more than two or three hours before a workout. Drink about 4 ounces every 15 minutes during exercise. After your workout, you should drink 8 ounces of water within 30 minutes of your cool down.

Eating after a hard workout is essential to replace the energy you burned during exercise. If you want to build muscle, you need to pay close attention to < href="/nutrition/eat-after-workout">what you eat after resistance exercises.

Rosenbloom recommends eating 10 to 20 grams of protein after exercising, to help build strong muscles. A study from The Journal of the American College of Nutrition found that whey protein helps build lean body mass, and more so than soy or carbohydrate.

Half a cup of low-fat cottage cheese contains about 10 grams of protein and an egg contains about 6 grams. The trick is to eat soon afterward, when the muscles are still recovering and growing. Eating carbohydrates gives you energy and protein helps muscles grow. You need both to properly refuel and repair the body. Good options include tuna with quinoa, eggs on whole-grain bread, or protein powders that you can add to fruit smoothies.

Remember to stay hydrated before, during, and after exercise. While drinking water is best, consider a sports drink or coconut water for longer workouts or in hotter weather. These drinks contain an added boost of carbohydrates (sugar) and electrolytes.

Though these recommendations are all important, there’s one guideline that is perhaps the most important: Pay attention to what works for you. Listen to your body, and work out responsibly.