Ego depletion is a concept from self-regulation (or self-control) theory in psychology. According to the theory, willpower operates like a muscle that can be exerted. Studies have found that tasks requiring self-control can weaken this muscle, leading to ego depletion and a subsequently diminished ability to exercise self-control. In the lab, ego depletion has been induced in many different ways, such as having to suppress emotions or thoughts, or having to make a range of difficult decisions. The resulting ego depletion leads people to make less restrained decisions. Consumers, for example, may be more likely to choose candy over granola bars (Baumeister et al., 2008).
Baumeister, R. F., Sparks, E. A., Stillman, T. F., & Vohs, K. D. (2008). Free will in consumer behavior: Self-control, ego depletion, and choice. Journal of Consumer Psychology, 18(1), 4-13.