Willpower is a muscle

“There’s been more than two hundred studies on this idea since then, and they’ve all found the same thing. Willpower isn’t just a skill. It’s a muscle, like the muscles in your arms or legs, and it gets tired as it works harder, so there’s less power left over for other things. If you want to do something that requires willpower—like going for a run after work—you have to conserve your willpower muscle during the day,” Muraven told me. “If you use it up too early on tedious tasks like writing emails or filling out complicated and boring expense forms, all the strength will be gone by the time you get home.”

Duhigg, Charles. The Power of Habit (p. 137). Random House.