Nutritionists commonly advise runners to eat a diet high in carbohydrates. For example, the website Cool Running advises runners to consume 60% of calories from carbohydrates:
Carbohydrates are stored in the muscles as glycogen, the primary fuel you need to keep you moving. When this efficient source of energy wears out, so do you. You hit the wall and can go no further (often after about 90 minutes or two hours of running).
— Cool Running
“Hitting the wall” is a common challenge in marathons. I remember how my legs would turn to wood after 15-16 miles and my mood would darken as well, as both muscles and brain were struggling with a diminished supply of energy.