Okay, here we go... Be nice to me.
If I'm really going for a long day, my food doesn't vary too much. After years, (decades) of not quite feeling great all the time... I finally worked with a nutritionist a few years ago and we started nailing down a good endurance diet for me.
I am a female, 5' 5" and 130 pounds.
I like (really like) long days. 20 miles is great. Every so often push to 30. (trail miles). Doesn't matter elevation. Average JMT days, for instance, are 15-20 miles and we are talking back-to-back backpacking days. Through-hike with lots of elevation gain/loss/day.
So, even when I'm doing a fun "true" day hike... my food doesn't vary too much. More "goodies" thrown in. But here's the core:
1+ hour before walking: SportLegs
Breakfast: Clif bar, includes about 9 g protein. Lots of carbs to get going
Just at start of walking: Stinger waffle (carbs to get going).
After about 1/2 to 1 hour, depending on difficulty of terrain/weight being carried, the following routine begins and ends when the walking stops:
Every 15 minutes: 1 energy chew (My favorite chew brands: Gu Chomp, Pro Bar Energy Chew, Stinger Energy chew, Cytomax energy chew) (If very steep/difficult/heavy pack, 1 every 10 minutes)
Every 2-3 hours: Sportlegs
Every 3 hours: 20 g protein - either in form of shake or protein bar. Shakes: Jay Robb Isolated Whey Protein is favorite, Egg Protein second. Lots of amino acids either way. If bar, ThinkThin protein bars (whey-based) are working well for me right now.
Fun additions: Cheetos, Peanut Butter filled pretzels, Tom-Tom turkey sticks (find at Whole Foods, no nitrates/nitrites), low-fat string cheese. (I only eat these during the longer "protein stops" and the sodium is incredibly useful on hotter days.) Trail mix of various types, though I usually pass on the chocolate bits to others. Electrolyte adds to my water on seriously hot days, but the chews are usually good enough - as long as I have my snacks every three hours.
At end of walking: another dose of Sportlegs, another 20 g protein. THEN dinner at appropriate time. Dinner on trail is typically splitting Mountain House with hubby. But we've packed in pizza, deli sandwiches, Wendy's chicken nuggets (current favorite) and the like. Little cakes and a sampling of the day's snacks.
If I eat a lot of fat DURING exertion, especially at altitude, I feel pretty awful. Sometimes seriously awful. I've learned to have my fat at dinner. My body processes it much better when not under load.
If I eat this way, I can go ALL day long. And feel good when I stop. Also, I feel better as the day goes on. I actually seem to speed up some. I really no longer feel sore, and can move about camp and get in/out of tents/shelters without much effort.
I'm not fast, but I know I can keep going. My goal is to hit camp and stay perky and cheery.