Ego depletion is a concept from self-regulation (or self-control) theory in psychology. According to the theory, which has come under heavy scrutiny, 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). More recent studies call this resource depletion model of self-control into question (e.g. Hagger & Chatzisarantis, 2016).
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.
Hagger, M. S., & Chatzisarantis, N. L. D. (2016). A multilab preregistered replication of the ego-depletion effect. Perspectives on Psychological Science, 11, 546-573.