We have a single reservoir of brainpower for all acts of cognition and self-control, even those that are unrelated. When people are asked to suppress their emotions when under duress — for example, not showing frustration or sadness while watching a tragic film — they subsequently struggle on a wide range of unrelated tasks, such as resisting tempting foods or storing items in working memory.

The phenomenon doesn’t stop there. Even physical challenges (e.g., performing a wall sit) can be impaired by exerting your mental muscle beforehand. Research shows that even if their bodies are fresh, the physical performance of people who are mentally fatigued suffers. Put differently, the boundaries between mental and physical fatigue are not nearly as defined as we think.

In a study cleverly titled “Hungry for Love: The Influence of Self-Regulation on Infidelity,” 32 college students in exclusive relationships interacted via chat room with a confederate (i.e., a researcher playing along) of the opposite sex. Prior to this chat, half the study participants were forced to resist eating a tempting food, while the other half could eat to their hearts’ desire. As you might expect, those who were forced to resist the tempting food were more likely to give their phone number to, and even accept a coffee date with, the confederate.

The study authors concluded, “Weakened self-control may be one potential cause for the levels of infidelity occurring in romantic relationships today.” So you may want to think twice before encouraging your significant other to go on a diet. (But you probably already knew that.)

A Look Inside Your Tired Brain

More recently, researchers have started studying the notion of a mental muscle with fancy imaging technology instead of cookies. What they are finding is quite intriguing. They put people with depleted mental muscles in an fMRI machine (a technology that lets researchers look at activity inside the brain) and discovered the brain of a tired person acts in a peculiar way. When shown a tempting image (such as a juicy cheeseburger) or asked to solve a hard problem, activity in parts of the brain associated with emotional response (the amygdala and orbitofrontal cortex) supersede activity in the part of the brain tasked with thoughtful, rational thinking (the prefrontal cortex).

Other experiments show that after someone is forced to exert self-control, activity in the prefrontal cortex diminishes altogether. It’s no wonder that when we’re mentally drained we struggle with complex problems and self-control, opting for cartoons and cookies instead.

Much like how, after you’ve lifted weights to the point of fatigue, your arms won’t function very well, after you’ve used your mind to the point of fatigue — be it to resist temptation, make a tough decision, or work on challenging cognitive tasks — it, too, won’t function very well. This fatigue might lead you to eat cookies, give up on solving a tough intellectual problem, or even prematurely give in during physical challenges. In the worst case, you might even cheat on you significant other.

Of course, this doesn’t mean you should avoid resisting all temptations on days when you need more mental stamina- rather that we can train our willpower in the same way we can train our muscles.  Just like your body, stressing and allowing the mind to recover makes it stronger.

Scientists have discovered that the more we resist temptation, think deeply, or focus intensely, the better we become at doing so. In fact a new line of research contests that willpower in particular is not as limited as scientists once thought, and suggests that by successfully completing smaller productive changes we can build the strength to complete larger ones in the future. So eat the cookie and give your brain a rest— or don’t— and get better at resisting future cookies. Either way, you win.