Night before I drink a hydration beverage.
About 2.5hrs pre race I have a PB&honey on white bread sandwich. 2 hrs pre race I take 150 to 200mg of caffeine, usually just from an energy shot. I do it that early because it moves the bowels (usually repeatedly) and there is often a bus ride and long porty potty lines involved.
Long before the race I research what they will have on course. I plan for that brand of goo every 45 minutes and alternate caffeinated and non-caffeinated. On several long runs before the race I follow this exact nutrition pattern so my stomach is prepared and I know can handle what is going race day.
And drink.
I’m sure experts could design it better, but that’s what I do.