You may gain weight unintentionally as a result of certain things you consume, such as sugary foods and beverages. But sometimes weight gain can occur due to an underlying health condition.

Weight gain can be extremely frustrating, especially when you don’t know what’s causing it.

While diet typically plays the largest role in weight gain, other factors — such as stress and lack of sleep — may contribute as well.

Here are 9 causes of unintentional weight gain.

Many healthy foods, such as oats, frozen fruit, and yogurt, are minimally processed.

However, highly processed foods, including sugary cereals, fast food, and microwave dinners, pack a slew of harmful ingredients, as well as added sugars, preservatives, and unhealthy fats.

What’s more, numerous studies link highly processed food to weight gain, in addition to rising obesity rates in the United States and around the world (1).

For example, a 2019 study in 19,363 Canadian adults found that those who ate the most ultra-processed foods were 32% more likely to be obese than those who ate the least (2).

Highly processed foods are typically packed with calories yet devoid of essential nutrients, such as protein and fiber, which keep you feeling full.

In fact, in a 2-week study in 20 people, participants ate about 500 more calories per day on an ultra-processed diet than on an unprocessed diet (3).

Thus, you should consider cutting out processed meals and snacks, focusing instead on whole foods.

Regularly downing sugary foods and beverages, such as candy, cakes, soda, sports drinks, ice cream, iced tea, and sweetened coffee drinks, can easily enlarge your waistline.

Many studies link sugar intake not only to weight gain but also an increased risk of chronic health conditions, including type 2 diabetes and heart disease (4).

In particular, sugary beverages are the largest source of added sugar in the United States and strongly associated with weight gain.

For instance, a review of 30 studies in 242,352 children and adults tied sweetened beverage intake to weight gain and obesity (5).

One study in 11,218 women revealed that drinking 1 sugary soda per day led to 2.2 pounds (1 kg) of weight gain over 2 years — meaning that cutting out sweets might have the opposite effect (6).

You can try gradually reducing your sugar intake to ease the process.

Inactivity is a common contributor to weight gain and chronic diseases (7, 8, 9).

Working a desk job, watching TV, driving, and using a computer or phone are all sedentary activities.

A study in 464 people with obesity and excess weight found that their average daily sitting time was 6.2 hours on working days and 6 hours on non-working days. Work-related tasks were the largest contributor, followed by watching TV (10).

Making a few simple lifestyle changes, such as exercising and sitting less, can make a big difference.

For example, a 3-month study in 317 workers found that replacing just 1 hour of sitting with 1 hour of standing during the workday reduced total fat mass and waist circumference while increasing lean muscle mass (11).

Research has also shown that engaging in excessive screen time contributes significantly to unintentional weight gain (12, 13, 14).

Even small adjustments, such as taking a walk after dinner instead of watching TV, working out or walking during your lunch break, investing in a standing or treadmill desk, or riding your bike to work, can counter weight gain.

Yo-yo dieting refers to cycles of intentional weight loss followed by unintentional weight regain.

Notably, this pattern is linked to an increased risk of weight gain over time (15, 16).

In a study in 2,785 people, those who had dieted within the previous year had greater body weights and waist circumferences than those of non-dieters (17).

Other studies reveal that restrictive eating and dieting may lead to future weight gain due to your body’s physiological responses to such behaviors, such as changes in hunger and fullness hormones (18, 19, 20).

Plus, most people who lose weight through restrictive dieting gain back most or all of it within 5 years (15).

To keep weight off long term, you should focus on sustainable lifestyle changes. These include exercise, cutting out processed and sugary foods, and eating nutrient-dense, whole foods rich in fiber and protein.

Although many lifestyle factors contribute to unintentional weight gain, certain medical conditions may also play a role. These include:

  • Hypothyroidism. This condition affects your thyroid gland and may cause weight gain or difficulty with weight loss (21, 22).
  • Depression. This common mental condition is linked to weight gain and obesity (23, 24).
  • Polycystic ovary syndrome (PCOS). PCOS is marked by hormonal imbalances that affect women of reproductive age. It may cause weight gain and make it difficult to lose weight (25).
  • Binge eating disorder (BED). BED is categorized by recurrent episodes of uncontrollable overeating and can lead to many health complications, including weight gain (26).

Other conditions, such as diabetes and Cushing’s syndrome, are likewise associated with weight gain, so it’s important to get the right diagnosis from your medical practitioner.

What’s more, certain medications, including antidepressant and antipsychotic drugs, can lead to weight gain. Speak to a health professional if you believe you’re gaining weight due to your medicine.

Sleep is essential for overall health and well-being. Insufficient sleep may trigger weight gain, among other negative effects (27).

A study in 92 women demonstrated that those who slept fewer than 6 hours daily had the highest body mass index (BMI) and the highest levels of visfatin (a protein secreted by fat cells), compared with women who slept 6 hours or more per day (28).

In a 2-week study in 10 adults with excess weight following a low-calorie diet, those who slept 5.5 hours per night lost 55% less body fat and 60% more muscle mass than those who slept 8.5 hours per night (29).

As such, increasing your sleep time may aid weight loss.

Some evidence associates 7 or more hours of sleep per night with a 33% greater likelihood of weight loss, compared with sleeping fewer than 7 hours (30).

If you have poor sleep quality, you can try limiting screen time before bed, reducing your caffeine intake, and going to sleep at a consistent time.

If you regularly eat processed foods, switching to a diet that’s higher in whole foods is an easy and effective way to promote weight loss and improve many other aspects of your health.

In fact, the most important factor in weight loss is choosing whole, minimally processed foods.

One study divided 609 adults with excess weight into groups that followed either a low-fat or low-carb diet for 12 months (31).

Both groups were instructed to maximize their vegetable intake, restrict their intake of added sugars, trans fats, and refined carbohydrates, eat mostly whole, minimally processed, nutrient-dense foods, and prepare most meals at home.

The study found that people in both diet groups lost similar amounts of weight — 12 pounds (5.4 kg) for the low-fat group and 13 pounds (5.9 kg) for the low-carb group. This demonstrated that diet quality, not macronutrient content, was the most important factor in their weight loss (31).

Incorporating whole foods into your diet doesn’t have to be difficult. Start by slowly adding more nutrient-dense whole foods, such as vegetables, fruits, beans, eggs, nuts, and seeds, into your meals and snacks.

Chronic stress is a common problem that can affect your weight (32).

High levels of the stress hormone cortisol have been shown to increase hunger and your desire for highly palatable, calorie-dense foods, which can cause weight gain (33).

What’s more, studies indicate that people with obesity have higher cortisol levels than those without this condition (34).

Interestingly, stress management may promote weight loss.

In an 8-week study in 45 adults with obesity, those who engaged in relaxation techniques like deep breathing lost significantly more weight than those who only received standard dietary advice (35).

To reduce stress, try incorporating evidence-based relaxation practices into your routine. These include yoga, spending time in nature, and meditation (36, 37, 38).

Overeating remains a prominent cause of weight gain.

If you take in more calories than you burn per day, you’ll likely gain weight (39).

Mindless eating, frequent snacking, and making calorie-rich, nutrient-poor dietary choices all promote excessive calorie intake.

It can be difficult to determine your calorie needs on your own, so consult a registered dietitian if you struggle with overeating.

Some simple ways to avoid overeating include paying attention to hunger and fullness cues by eating mindfully, following a high-fiber, high-protein diet rich in plant foods, drinking water instead of calorie-rich beverages, and increasing your activity level.

Many factors can contribute to unintentional weight gain.

Poor sleep, sedentary activities, and eating too many processed or sugary foods are just some of the habits that may increase your risk of weight gain.

Yet, a few simple steps — such as mindful eating, exercise, and focusing on whole foods — can help you reach your weight loss goals and improve your overall health.