It is hard to determine what the exact food to eat before an event or workout should be. Each athlete is different and will need to determine what works for them based on experience. With that said there are a few general rules to follow when figuring out what works best for you.
First, you need to plan your nutrition based on your specific needs. For example, if you have an all day event like a track meet or swim meet, you will need to plan your meals and snacks according to your event times. It is a delicate balance to make sure your body has enough energy to get through your race or workout yet not feel sluggish and heavy. Again everyone is different so this balance is different for everyone.
Second, eating a large meal just before your race or workout is not a good idea. It takes a lot of effort and time for your body to break down food. When you eat a good portion of your blood goes to the stomach and digestive tract to work on digesting and breaking that food down so your body can use it for fuel. When you attempt to workout or race on a full stomach the body has a hard time pumping blood to the muscle for energy. This can cause stomach upset, nausea, and cramping.
Third, avoid proteins and fats just before your race. These molecules take much longer for your body to break down and it isn't the main energy source the body wants to use. The main source of energy the body wants to use is glucose and glucose comes from carbohydrates. There are two different types of carbohydrates, simple and complex. Simple carbohydrates are easy for the body to digest and absorb right into the system, while complex carbohydrates take longer to digest, take longer to store and are usually full of fiber.
Forth, days before your event you will want to load up on your complex carbohydrates. You may have heard of the term "carbo load", well this is what you are doing. However, make sure you are eating good sources of carbohydrates such as brown rice, yams, gluten free pasta, gluten free bread and lots of veggies.
Fifth, the day of the event eat light and drink plenty of water throughout the day. The closer you get to your event the less you should eat. You want to stave off hunger pains but not be full.
Good foods to eat 4 or more hours before your event, gluten free toast with almond butter, oat meal, nuts and seeds, veggies and gluten free crackers with hummus, water
Good foods to eat 2-4 hours before your event, lara bar (or good energy bar), dates, bananas, melons, light smoothie, water
Good foods to eat 1-2 hours before your event, apples, oranges, grapes, pineapple, water
Good foods to eat 1 hour or less before your event, if you can drink some water and see if that sustains the hunger, at this point be a bit careful on what foods you put in your body, watermelon is very light and has a bit of sugar for a boost, you can also try fruit juices but water them down so the jolt of sugar isn't to much
Be a bit careful about eating sugary foods right before your event. Some athletes do great with a small amount of sugar to give them a boost, others do not preform well after and insulin spike.
These tips can be a good starting point for you to figure out what works best for you. Some athletes do much better racing while they are hungry, while others need to have a satisfied stomach. You will need to figure this balance out so you can preform at your best. Food can be a huge factor in your overall performance so make healthy choices and your body will be the best it can be.