What you eat before and after you exercise makes a big difference in your performance and recovery, especially if you're an athlete. This training diet from the Iowa State University suggests carb-rich meals before, light snacks during, and fluid replacement after exercising.

The sports nutrition article states that it's not just the pre-exercise meal alone but the meals you eat in the 2 to 3 days before you exercise that fuel your muscles. So it's important to eat high-energy meals a couple of days before serious training or an event (track meet or basketball game, for example).

Although what you should eat would vary by the kind of exercise or activity you're doing—and how intensely—the cornerstone of an athlete's diet is carbohydrates. Avoid high fat and protein diets, since they won't provide energy for your exercise. Update: the article is targeted for athletes who are training for competition, so your mileage may vary. Although it recommends carbohydrates be your primary food source, if you look at the suggested meals in the article for afternoon and evening events, at least, proteins like eggs and chicken are included.

As to when you should eat specific foods, the general guidelines are to eat a solid meal 4 hours before exercising or a liquid meal 2-3 hours before. Within 1-2 hours before exercise, try a high carb/energy drink or fluid replacement drink. If you have less than an hour before activity, just have water or a fluid replacement drink.

During an event, go for water, and don't bother with energy drinks—they don't increase performance for exercises under 90 minutes.

After you exercise, get some carbs (from fruits, sports drinks, smoothies, juices, etc.) within 15 minutes to restore glycogen. Within 2 hours of exercise, go for a carbohydrate-rich meal combined with lean protein. This recommendation contrasts with one we've previously seen about low-carb meals providing health benefits post-workout by increasing insulin sensitivity, making it easier for the body to store sugar in muscles for fuel. (Thanks everyone for the corrections.)