Again, the article above explains planning your food intake up to 24 hrs before a race from the voice of a professional dietician/nutritionist and includes what types of food to eat and the timing of eating before racing and training for optimal digestion and performance.
From my personal experience, my overall diet varies very little whether I am racing, training or in an “off” season. The variable that changes the most is portion size/caloric intake. (If I am training a lot or in cold weather, I will likely need to consume more overall calories) This will vary person to person depending on size, gender and activity level.
For me, the average 24 hours before a race begins with morning breakfast of Bob’s Red Mill Steel Cut Oats with fruit and maple syrup and 1 cup of decaf coffee with soy milk and agave. Most days of the week I train on the bike within 2-3 hours of eating my breakfast. After training I will often have leftovers from the night before as lunch and a recovery meal. Some athletes prefer to make a shake in the blender with fruits and protein powder or chocolate milk with banana with peanut butter. I will often make a shake in the summer when it’s hot and easier to get in some quick calories, but during cross season I tend to prefer warm foods. Later that day I will have a snack of a Clif Bar energy bar or homemade energy bars.
For dinners, I try to keep meals balanced with a plant-based protein such as tofu, tempeh, beans or seitan and 2-3 vegetables such as leafy greens, potatoes, broccoli or squash. Meals will often combine a combination of these ingredients with whole grains such as brown rice, barley, polenta or quinoa.
Eating consistently tends to keep my overall energy and blood sugar more level for training throughout the week and then racing on the weekends.
On race day, I start with my usual steel cut oats and decaf about 4 hours before my race. Then, 2 hours before start time, I usually have an English muffin with light peanut butter and a bottle of electrolyte sports drink. While warming up in the hour before the race starts, I will continue to drink water and sports drink. About 15 minutes before race start I will have a gel and then off I go for 40 minutes of all out racing!