Willpower is a diminishing resource that is replenished every night. When you wake up, if you have slept well, your willpower is at max. It will only go down as you proceed with your day.
For example, if you want to avoid sugar in your food, it is relatively easy to avoid ice cream or cookies when you have breakfast. But after a day of hard work and meetings, when you come home and decide to watch Netflix at 10pm, ice cream doesn't seem like a bad idea and you will usually succumb to your cravings.
Think about willpower as about a certain amount of money you have, that refreshes every time you wake up but instead of spending it on things you spend it on decisions.
If you are used to have breakfast with maple syrup waffles and instead decided to opt for eggs with vegetables, you spend $10 out of your hundred dollar budget for a day. Then you spend a little on deciding what t-shirt to wear for work and a little on what sneakers to put on and so on. By the time you are back home at 8pm you have only a few dollars left or maybe you are already deep into credit and decision to work on a side project or do a stretching session seems unrealistic.
There are a few ways to fight this. First, it seems that establishing a routine helps a lot. If you are used to go to gym every other day at 7pm, despite what willpower you have left, you will go anyway. By establishing routines, you save yourself a great deal of willpower that can be spent on the really important decisions.
You can also restore willpower by taking a nap or meditate. While the nap helps almost always as it is a shorter version of a night's sleep and works perfectly well, the meditation is a tough one. For me it doesn't always work because to meditate and sit motionlessly in silence is a task hard that drains willpower and I am not always sure if it helps.