The timing of your meals in relation to when you exercise is very important. If you eat too early you'll be hungry and might not have enough energy to complete your routine. If you eat too soon you can risk an upset stomach, cramping and having no energy.
When you eat (especially a large a meal) blood rushes to your stomach to help with digestion. If you workout right after you eat, your muscles will compete for blood with your stomach and will leave you feeling tired.
Avoid eating large meals 2-3 hours before you workout. Eating small meals (such as a small sandwich, fruit or a drink) can be done within an hour of working out.
During exercise that lasts longer than an hour, studies have shown a sports drink can help you improve your performance. If you are exercising for less than an hour these same studies show that these drinks do not offer any significant help.