Gas at night may be due to diet, swallowing air, or conditions such as irritable bowel syndrome (IBS). Depending on the cause, treatments can include dietary changes and preventive steps.

Having gas in the digestive system is a normal part of the digestion process. The body gets rid of any excess gas by burping or through flatulence.

A person may experience pain if gas does not continuously move through the system or if it becomes trapped.

An increase in gas or pain can occur from eating foods with a higher chance of producing gas. In this case, making certain dietary changes may alleviate gas. Certain digestive disorders can also cause excess gas and discomfort.

This article will examine the potential causes of gas at night. It will also look at some treatment options and prevention tips for excess gas.

a person suffering from gas at night lies awake lies awake with their head on the pillow and eyes openShare on Pinterest
Image credit: PictureNet Corporation/Getty Images

Having gas is normal. In fact, most people expel around 600–700 milliliters of gas daily and pass gas around 14 times every day.

Even if people think that they burp or have flatulence too frequently, medically passing too much gas on a regular basis is uncommon.

People may experience gas at night due to eating close to bedtime. Specifically, lying down very soon after eating may cause indigestion, which can produce gas.

Also, eating a large meal can trigger some conditions, such as irritable bowel syndrome (IBS). If a person eats their largest meal at the end of the day, they may experience gas at night.

Some people may also be more aware of their bodies when they have stopped their daytime activities and are relaxing at night. This may cause them to notice more gas.

People may be able to reduce gas at night by making certain changes to their dietary habits.

If a person has excessive gas at night and other symptoms are also present, there could be an underlying gastrointestinal issue.

There are several potential causes of gas at night. The following sections will look at these in more detail.


Many foods and beverages can cause gas, including:

  • fruits, such as apples, peaches, and pears
  • vegetables, such as onions, mushrooms, navy, pinto, and black beans, and cruciferous vegetables, including Brussels sprouts and broccoli
  • foods containing lactose, such as milk, cheese, ice cream, and certain packaged foods
  • certain beverages, such as carbonated drinks, fruit drinks, and drinks containing high fructose corn syrup
  • artificial sweeteners, such as sorbitol, mannitol, and xylitol
  • fiber additives, such as inulin and fructooligosaccharide

Some people may have fructose intolerance, which means that they may experience gas, bloating, or diarrhea after eating substances containing fructose.

People may find it helpful to keep a food diary to see if any specific items cause excess gas. This can help them determine the amount of gas-producing foods or beverages that they can tolerate.

Avoiding or reducing the intake of certain foods or beverages may help reduce gas.

Swallowing air

Swallowing air can also cause gas. People may swallow air by:

  • eating or drinking too fast
  • smoking
  • chewing gum
  • wearing loose dentures

Most of the time, the body will release the majority of swallowed air through burping, and the remaining gas will pass through the intestines and out through the rectum.


IBS is a gastrointestinal condition that affects the large and small intestines.

Although there is no exact cause of IBS, some factors that may play a role in its development include:

  • genetics
  • lifestyle
  • allergies
  • intestinal bacteria levels
  • stress
  • diet

IBS can cause other symptoms alongside gas, such as:

People can usually manage IBS symptoms by making certain dietary changes. These include:

  • eating meals at the same time each day to help regulate the bowels
  • eating smaller meals more frequently, instead of larger ones less frequently
  • drinking plenty of fluids to aid digestion
  • limiting alcohol, caffeine, artificial sweeteners, and carbonated beverages, which may cause diarrhea and gas
  • keeping a food diary to identify any foods or beverages causing symptoms
  • being mindful of these trigger foods and avoiding them when possible

Lactose intolerance

The bodies of people with lactose intolerance cannot break down lactose, which is the natural sugar in dairy products.

People with lactose intolerance may experience the following symptoms after eating or drinking milk products:

  • gas
  • diarrhea
  • bloating
  • nausea
  • stomachache

A healthcare professional may carry out a breath test to diagnose lactose intolerance. The body produces certain gases, which a breath test can detect, if it is unable to digest lactose.

Avoiding or limiting the intake of products containing lactose can help people manage their symptoms.

Lactose-containing products include dairy, such as cheese, yogurt, and butter, as well as some processed and baked goods. Some medications may also contain lactose.

Celiac disease

Celiac disease is an autoimmune condition that causes damage to the small intestine when a person with it eats gluten.

Digestive issues are more common in children than in adults. Symptoms in children may include:

  • gas
  • bloating
  • diarrhea
  • constipation
  • stomach pain

Symptoms in adults may include:

A healthcare professional may use an endoscope to take a tissue sample from a person’s intestines to test for celiac disease. If they detect and diagnose celiac disease, the person will need to follow a gluten-free diet.

Food sensitivity

Some people may be sensitive to gluten, sulfur, or other substances in foods and beverages, and this can cause digestive issues.

These people may need to work with a healthcare professional to follow an elimination diet. An elimination diet can help identify specific foods or beverages that cause uncomfortable symptoms, such as gas and bloating.

People will usually follow an elimination diet for 4–8 weeks. During this time, they will eliminate the substance that they suspect is causing problems to see if their symptoms improve. They can then gradually reintroduce the substance to see how much of it their body can tolerate.


Gas can sometimes be a side effect of certain medications. These include:

  • nonsteroidal anti-inflammatory drugs, such as ibuprofen
  • certain laxatives
  • antifungals
  • statins

If a person thinks that a medication is causing their gas, they can talk with a healthcare professional about alternative options.

To help prevent gas, people can try avoiding or limiting the following foods and beverages:

  • carbonated drinks
  • fried foods
  • high fat foods
  • sugar

If a person finds that high fiber foods are causing their gas, they may wish to limit their intake for a few weeks before gradually increasing it again.

Some other things to try to prevent gas include:

  • eating smaller meals more frequently
  • avoiding chewing gum, smoking, and drinking through straws to limit swallowing air
  • eating and drinking slowly
  • exercising often to assist digestion
  • drinking plenty of fluids to assist digestion
  • drinking peppermint tea
  • not wearing loose dentures
  • restricting foods that produce gas or trigger symptoms
  • gradually increasing daily fiber intake
  • waiting 2–3 hours after eating before lying down

If a person has a particular condition, such as IBS or a food sensitivity, avoiding trigger foods and working alongside a healthcare professional can help reduce or prevent gas.

Gas at night may affect a person’s sleep quality. Gastrointestinal conditions may lead to sleep conditions, which can impact health and worsen gastrointestinal symptoms.

A person should seek treatment for any health condition they suspect because, without treatment, these can reduce quality of life and lead to complications.

A person should contact a doctor if other symptoms, such as the following, accompany gas at night:

  • constipation or diarrhea
  • unintentional weight loss
  • a reduction in sleep or life quality
  • sudden changes in symptoms
  • recurring bloating or stomach pain
  • blood in stools

A person should also seek advice from a healthcare professional if home remedies or dietary changes are not effective at relieving their symptoms.

Gas at night may occur for many reasons and could be a normal part of the digestive process. Eating a large meal before bedtime or consuming certain foods and beverages could trigger excess gas.

If a person has gas at night alongside other symptoms, a healthcare professional can check for underlying conditions.

People can reduce excess gas by making certain dietary changes. If a person has a medical condition that causes gas, treating the condition may reduce their symptoms and discomfort.