I do a lot of adventure races, which feature a minimum of MTB, trail running & kayaking. I never know until about an hour before the race (at most) which discipline will start the race, but the point is that rarely does one start slowly. I NEVER get stomach problems, vomiting, nausea etc, either during or after.
As others have suggested, a meal at least two hours before the race, not sooner, and not a large one either - just normal. I do my carbo loading in the days (multiple) before the race, and the same with hydration. Just doing it the night before is too late. Sometimes a good steak the night before helps with endurance, but never a huge meal.
During a sprint race (4-6hrs), I usually have a backpack of about 3-5kg, inc water bladder or bottles. Mebbe less, if coming through frequent transitions. Longer races (my longest so far is 48hrs), I carry up to about 10kg. To keep the energy high, to avoid cramps, and to avoid dehydration, I’ll be snacking continually - mebbe every 20 mins on a long race, definitely something salty if it’s hot weather. Problem with a lot of the gels / energy drinks is that they don’t use maltodextrin as their carbo base, instead using simple sugars designed to give a gym-bunny his/her boost while running in airconditioned surroundings. Just like drinking a coke, lol.
Bananas are good, but don’t eat too many too quickly - can lead to stomach cramps, due to the bloating they cause in excess. Even easier to make that mistake when using dried bananas…been there, lol.
Make sure your electrolytes are taken care of, and keep the calories coming, and you’ll be good to go for the long sessions. Once you start dehydrating, you’ll get the nausea as well as the cramps. And after a partic hard session, get a good dose of protein within a MINIMUM of 20 mins, and you’ll suffer far less the following day. Any longer and the benefit is markedly reduced. Lotsa peeps swear by Nuun tablets, and while I have some, I’ve not used them before. Clif gels are convenient tho short-lived. Caffeine can really help, surprisingly - friend of mine wins MANY races and he seems to live on it during a race. I go for a lot of cereal bars, dried sausage (droe wors), nuts & raisins (excellent!), some endurance gels (rather than energy gels), Indian spicy mix, etc.
some races I’ll come into transition, wolf down a bigger meal and immediately start the next leg - no time to digest. I just take things easier for a while then build up the speed. That means sometimes my training will include sessions straight after a big meal, to acclimatise my body to that partic stress. Works for me I also use powdered food (eg Peronin, from Germany) during long races which has a 90+% absorption rate, compared to 60+% for normal food, and reduces the need for dropping a number two quite effectively. Less time wasted…
I’ve done 100km hikes non-stop and been ready to go the next day. Not immediately another 100km, since I’m not an ironman etc, but point is that aside from the odd stiff muscle, good for another training session. If you do regular exercise, your recovery times should become shorter and shorter.
Onward! And if you must have something sweet, honey is king!