An understanding and application of the basics of eating and drinking before, during and after exercise will greatly help your preparation and ride experience. Riders sometimes don't realize the importance of before and after, and tend to only think in terms of during ride itself.
Here are some of the basics: Some further references are provided later.)
Hydration: (Critical to both cooling as well as nutrient transport)
- drink often and in small amounts - before you get thirsty
- drink before, during and after extended exercise
- too much is as bad as too little (your body can only absorb at a certain rate)
Electrolytes: (As important, though often forgotten piece of the puzzle.)
- don't rely on sodium (salt) only
- use electrolyte supplements &/or 'sports drinks'
Fuel: (Provides the calories to keep you going.)
- avoid simple sugars (They provide fast acting but very short lived impact.)
- complex carbohydrates provide a sustained energy source
- use protein supplements
There are LOTS of specialist products available - 'energy bars', gels, power / water mixes
With respect to the above, practice drinking and eating during training rides - don't leave it to the actual event. That way you will get to know what is best for you personally. Experiment a little with different products.
Check out this fueling handbook.