If you eat before exercising, make sure you allow your body some time to digest and absorb the food. During digestion, our bodies send blood to the stomach to help out with this process. When we exercise, our muscles need the blood flow, so our stomach becomes a second class citizen and digestion is slowed. If too much food is in the stomach while we're exercising, most likely we won't be too comfortable. Also take into account the type of food you consume and the activities you perform.
Some people tolerate liquids more easily because they leave the stomach quicker than solid food.
With less than one hour, a small snack will do. In addition, people tolerate foods differently, and the composition of the food matters. Fats stay in the stomach longest, followed by protein and high fiber carbohydrate, then low fiber complex carbohydrates, and finally simple sugars, which are absorbed fastest. Avoid sugary foods, including juice, an hour before exercise. Bodies absorb the sugar in these foods quickly, and you may feel lightheaded and tired during your exercise as a result.