There are a few reasons why people might gain weight when they're unhappy. One reason is that when people are unhappy, they might comfort eat or eat unhealthy foods. Unhappy people might also be less active, because they don't have the energy or motivation to do anything. Finally, some people might gain weight when they're unhappy because of the stress hormones that are released when they're stressed out.