Some thoughts based on what I've done in the past (seems similar to yours) below. Curious whether muscle fatigure was due to going out harder than anticipated, possible dehydration, or something else. For food...
Day before - cut all fiber at 11am
-Increase salt intake (esp. if heat will be an issue)
-Have a lunch that is mostly carbohydrate, low fat, and includes some protein. Target ~800-1000 calories. White breads, pastas, pretzels etc are good as are sandwiches.
-Dinner of proportion and no fiber with a slightly larger protein component.
Race Day - wakeup at least 2-3hrs before the race.
-400-700 calories. Ex: Bagel plain or with jelly + apple juice + banana
-Strong cup of coffee
-Finish meal so that stomach is nearly empty 30 min before start.
-Sip 8-16oz of water.
-Off to the races (basal @ 0-50% depending on pre-race BG level, gels every 1/2 hr to hour depending on BGs). Post race temp basal for several hours, extra carbs in 2nd post race meal.
Good luck in your race!