Willpower
Being physically tired is a fairly well tuned mechanism. Exertion depletes resources in muscles, which then become less effective until their recovery. However, this is not all: there is a psychological component, not wanting to continue running around after a whole day hike, not because less efficient muscle activity but because it doesn't feel good; the goal of this is preventing damage from over-exertion & helping recovery even if the organism that the muscles belong to doesn't have an explicit mental roadmap for accomplishing this. If you keep solving hard math problems or studying for a boring class for an entire day, there is no equivalent measure of "muscle exertion" that we could satisfyingly measure. Computationally, it might not even be harder than walking around and processing visual information from our eyes. And yet, most people doing this do get tired.
We blame the lack of "willpower" when we cannot do this long enough. "It's like a muscle", as the common wisdom goes, "you got to train it". Which might be true to a certain extent, but... ... what if the only thing that we are fighting is our own protective mechanisms, preventing us from getting stuck performing intuitively ineffective actions?
Imagine one of our ancestors trying to crack open a nut. It's probably worth trying for 5 seconds; not giving up for 5 hours is fairly counterproductive, spending more than a day on it is increasingly bad for survival. So... while we could technically keep going, there are great benefits to feeling an increasing aversion to continuing with tasks that we're not making progress on.
Well, as it turns out, in the modern world, a lot of things give less direct feedback than cracking nuts; you can accomplish great things if you just keep ignoring these warning signs of "time to give up" until you get your university degree, for example.
There are workarounds. And exploits. There are people playing World of Warcraft for 13 hours a day, without any signs of the above mechanism kicking in. (... this is typically not considered great.) There are also people working 13 hours a day; opinions differ on how good this is for you, but sometimes there are positive results.
You could build up an appreciation of "I always finish what I started", to counteract this preventive force even if it kicks in. (I guess this somewhat counts as "willpower".) This is not how the 13 hour WoW players do it though. They just ended up in the right environment to keep going, their intuition confirming that this is the Right Thing.
Also consider the fact that if what you're doing feels pointless, boring and exhausting, there is a reasonable chance that it is pointless, boring and exhausting and you shouldn't be doing it for a large fraction of your day.
Perhaps finding the things that you find, in an odd way, a lot less exhausting and boring than other people is the road to accomplishing great things?
(It is also the way to playing 13 hours of WoW a day though. Your mileage might vary.)