While you have probably heard of 'Circadian Rhythms' which regulate your daily hormonal cycles through your Hypothalamic-Pituitary-Adrenal (HPA) axis (things like sleep, wake, dark, light, thirst, hunger etc.). Research shows that maximizing your motivation and productivity requires you to also honor your 'Ultradian Rhythms', which were historically understood to cycle every 90-120 minutes. By working for a maximum of 90 mins, and including a break -- no longer than 20 minutes -- you are more likely to be able to reach a state of flow and maintain your productivity and performance throughout the day.
Interesting new research shows that technological advancements are serving to shorten attention spans significantly - allowing that you don't likely have the historical 90 minutes of productive time - you likely have something closer to 60 minutes, after which point you would require a cognitive break (preferably one in which you are moving!) in order to reset and be able to better refocus.
Instead of thinking about your day like a marathon, think of your daily energy as a series of short jogs, punctuated by rest, instead of a marathon, and you are better poised to stay motivated, productive, and get more done.