We generally think of our willpower as determining what we eat. And it's true: If we just had the mental strength to resist those chocolate chip cookies, our diets would instantly improve. But science says the opposite is also true. What we eat contributes greatly to our ability to resist temptation.

This is less intuitive, but it's backed up by research. Hunger, or more specifically, low blood sugar, does some terrible things to our self-control.

Studies show "that low blood sugar makes you more susceptible to temptation. The idea itself isn't new. People who have low blood sugar are more likely to take risks, spend impulsively, cheat on a test, crave a cigarette, and even flirt with someone they have no business flirting with," writes Stanford psychologist Kelly McGonigal on Psychology Today.

Hungry students have been shown to misbehave more, while hungry judges hand down harsher sentences. If you're not determining custodial sentences or sitting the SATs this science still matters -- whatever you're doing that takes mental strength and focus, whether it's resisting the siren song of Krispy Kreme or planning the future of your business, you'll do it better with stable blood sugar.

How to eat for stable blood sugar.

A host of experts have written on how to eat for increased grit, and some of them are more extreme than others. This guy, for instance, swore off carbohydrates and started putting butter in his coffee and claims his life was transformed. Maybe it was. I still am not going to give up bread and drink butter coffee.

But even if you're unwilling to radically overhaul your diet, experts seem to agree on a few manageable changes that should keep your blood sugar steadier and help keep your willpower up.

  • Go ahead and graze. Most of us were taught that snacking was unhealthy, but depending on what you're snacking on (and how big your main meals are), eating small quantities throughout the day can be a great way to keep your blood sugar on an even keel. So go ahead and grab that handful of almonds if you're starting to feel a little fatigued. Just don't use this as an excuse for a daily Snickers (and consider whether you should eat a bit less at lunch or dinner to compensate).
  • Be wary of quick sugar. You want to avoid spikes and crashes in blood sugar, so avoid foods like, unfortunately, that delicious doughnut, which will cause just that. Opt instead for food with "a low glycemic index," i.e., things like oatmeal, nuts, and avocados, which release their sugar slowly.
  • Don't starve yourself. That tiny lunchtime salad might make your feel virtuous but by around 3 p.m. it's also going to make you feel hungry -- and when we're hungry our body freaks out and we make worse decisions (and not just about food). Same goes for those mornings when you're "too busy" for breakfast -- chances are the five minutes you save not scarfing cereal will be more than canceled out by the time cost of late-day muddle-headedness.