ADVERTISEMENT
Ads on our site help support our mission to improve sleep health. Sleep Foundation doesn't endorse third-party products or services. Ad Policy
Key Takeaways
  • It’s normal to fart during sleep, even though you usually are not aware that it is happening.
  • The anal sphincter relaxes during sleep, which can make it easier for intestinal gas to pass.
  • Diet, swallowed air, food intolerances, medications, and digestive conditions can all increase nighttime gas.

Aside from being a potential source of embarrassment, passing gas is common and usually harmless. Most people pass gas between 13 and 21 times per day. Flatulence during the night is generally due to diet and lifestyle, although there are some digestive disorders that can cause excess gas.

Looking to improve your sleep? Try upgrading your mattress.

Do You Fart in Your Sleep?

People commonly fart in their sleep, although they usually are not aware of it. Research suggests pressure in the anal sphincter muscle fluctuates in cycles throughout the day. This muscle is more relaxed during sleep, and it controls whether or not gas present in the large intestine is released. This muscle also spontaneously relaxes multiple times per hour in the morning. As a result, passing gas overnight or in the morning is common.

If you want to fart less during the night, it helps to understand what gas is, why humans pass gas, and what factors lead to excessive gas. By making lifestyle changes or addressing underlying health issues, you may be able to reduce your nighttime or morning flatulence.

What Causes Farting During Sleep?

People fart in their sleep for the same reasons they fart while awake. Gas found in the intestines comes from three sources: air being swallowed, stomach acid becoming neutralized, and bacteria in the intestines creating hydrogen and methane.

This air can exit as flatulence or belching. Gases created by intestinal bacteria generally account for about 75% of flatulence. This gas may be expelled at any time, while a person is awake or asleep.

Although everyone experiences gas, certain individual factors impact how much gas a person’s body creates.

Foods and Drinks

Consuming certain foods and drinks make your body more likely to produce gas. Researchers call these foods flatulogenic, because they increase flatulence. Foods that may increase gas include:

  • Artificial sweeteners
  • Carbonated drinks, like soda and sparkling water
  • Beans, soy beans, corn, and peas
  • Breads, cereals, and pastries
  • Cabbage, broccoli, Brussels sprouts, and cauliflower
  • Onions, leeks, and garlic
  • Prunes and figs

Experts note that different people experience gas after eating different foods. Not everyone will pass more gas after consuming items on this list, and some people might find that foods not on the list cause gas for them. Also, adding more fiber to your diet might cause more gas initially, but that could taper off as your body adjusts. Fruits and vegetables contain large amounts of fiber, while meat and dairy do not contain any fiber.

People who have food sensitivities or intolerances may experience more gas when they consume foods they cannot properly digest. For example, those with lactose intolerance may pass more gas after having foods that contain lactose, such as milk or cheese.

Lifestyle Factors

In addition to aspects of your diet, other things you do might increase the amount of gas you pass:

  • Taking antibiotics
  • Chewing gum, especially with artificial sweeteners
  • Eating quickly
  • Smoking cigarettes
  • Wearing loose dentures

Medical Issues

Multiple digestive disorders and conditions can cause excessive gas:

  • Irritable Bowel Syndrome (IBS): IBS involves abnormalities in how the gut and brain connect, but the digestive system itself looks normal. In addition to excess gas, people with IBS often experience abdominal pain, diarrhea, or constipation. About 12% of people in the U.S. have IBS.
  • Small Intestinal Bacterial Overgrowth (SIBO): People experiencing this disorder either have an overgrowth of bacteria in general or of a certain type of bacteria in the small intestine. As a result, they experience more gas than normal along with other symptoms, like diarrhea.
  • Crohn’s Disease: In this inflammatory bowel disease, a person develops inflammation in their digestive tract. Usually the inflammation is in the small intestine, but it can occur anywhere in the digestive system. The cause of Crohn’s is unknown, but it is an autoimmune disorder, meaning the immune system attacks healthy tissue.
  • Ulcerative Colitis:Ulcerative colitis is an inflammatory bowel disease similar to Crohn’s, but with inflammation that usually occurs in the large intestine rather than the small intestine. In addition to gas, a person with this disease may experience abdominal pain, diarrhea, bloody stool, and other symptoms.
  • Celiac Disease: Celiac disease is a genetic autoimmune disease in which a person’s small intestines are damaged as a result of consuming gluten, a type of protein. Wheat, rye, and barley contain gluten. In addition to gas, a person may experience diarrhea, pain, irritability, or depression. Treatment requires a person to go on a gluten-free diet.
  • Colorectal or Stomach Cancer: Cancer is when abnormal cells grow in parts of the body, sometimes disturbing or destroying nearby healthy cells. If cancer causes a blockage in the digestive tract, excessive gas may occur.

Menstrual Cycle

People who menstruate are more likely to experience bloating and gas at certain points in the monthly menstrual cycle. The menstrual cycle is typically a period of 24 to 38 days, and menstruation is around three to five days during which the uterine lining sheds. The menstrual cycle can exacerbate IBS symptoms, which may cause more bloating and gas during menstruation.

Premenstrual syndrome (PMS) is a group of symptoms that start around a week before a person’s period begins. More bloating and gas may also occur during PMS.

How to Stop Farting in Your Sleep

There are actions you can take to reduce morning and evening gas. The following lifestyle interventions may help:

  • Avoid talking while eating and drinking as it can prompt you to swallow air
  • Stop chewing gum and eating hard candy
  • Avoid drinking carbonated drinks
  • Do not drink beverages through a straw
  • Sit down to eat and chew slowly
  • Quit smoking
  • Eat small, frequent meals
  • Consider a side sleeping position

If these tips do not help, you may want to see your doctor. You can talk to your doctor about possibly reducing or eliminating foods that cause gas from your diet. It is important to be careful when making dietary changes, because many foods that cause gas are part of a healthy diet, and you do not want to switch to a diet that does not meet yournutritional needs.

You can also discuss over-the-counter medications for gas with your doctor. There are also medications available that reduce the odor of gas. If you have lactose intolerance, you may want to consider taking lactase when eating dairy products. Also, probiotics and some dietary supplements might help reduce gas, but you should talk to your doctor before starting them.

Make an appointment with your doctor if your gas is accompanied by other symptoms, such as weight loss, blood in stool, or a feeling of having gas in your chest. Your doctor can ask questions and order tests to determine if you are dealing with an underlying disorder.

Still have questions? Ask our community!

Join our Sleep Care Community — a trusted hub of sleep health professionals, product specialists, and people just like you. Whether you need expert sleep advice for your insomnia or you’re searching for the perfect mattress, we’ve got you covered. Get personalized guidance from the experts who know sleep best.

Learn more about our Editorial Team

References
17 Sources

  1. Kurbel, S., Kurbel, B., & Vcev, A. (2006). Intestinal gases and flatulence: Possible causes of occurrence. Medical Hypotheses, 67(2), 235–239.

    https://pubmed.ncbi.nlm.nih.gov/16574342/
  2. American College of Gastroenterology. Belching, bloating, and flatulence.

    https://gi.org/topics/belching-bloating-and-flatulence/
  3. A.D.A.M. Medical Encyclopedia. (2021, September 1). Gas – flatulence. MedlinePlus.

    https://medlineplus.gov/ency/article/003124.htm
  4. Manichanh, C., Eck, A., Varela, E., Roca, J., Clemente, J. C., González, A., Knights, D., Knight, R., Estrella, S., Hernandez, C., Guyonnet, D., Accarino, A., Santos, J., Malagelada, J. R., Guarner, F., & Azpiroz, F. (2014). Anal gas evacuation and colonic microbiota in patients with flatulence: Effect of diet. Gut, 63(3), 401–408.

    https://pubmed.ncbi.nlm.nih.gov/23766444/
  5. International Foundation for Gastrointestinal Disorders. (n.d.). Treatment of gas.

    https://iffgd.org/gi-disorders/symptoms-causes/intestinal-gas/treatment/
  6. Youdim, A. (2019, August). Fiber. Merck Manual Consumer Version.

    https://www.merckmanuals.com/home/disorders-of-nutrition/overview-of-nutrition/fiber
  7. National Institute of Diabetes and Digestive Kidney Diseases. (2021, June). Symptoms & causes of gas in the digestive tract.

    https://www.niddk.nih.gov/health-information/digestive-diseases/gas-digestive-tract/symptoms-causes
  8. National Institute of Diabetes and Digestive Kidney Diseases. (2017, November). Definition & facts for irritable bowel syndrome.

    https://www.niddk.nih.gov/health-information/digestive-diseases/irritable-bowel-syndrome/definition-facts
  9. A.D.A.M. Medical Encyclopedia. (2020, January 9). Crohn disease. MedlinePlus.

    https://medlineplus.gov/ency/article/000249.htm
  10. National Institute of Diabetes and Digestive Kidney Diseases. (n.d.). Ulcerative colitis.

    https://www.niddk.nih.gov/health-information/digestive-diseases/ulcerative-colitis
  11. MedlinePlus: National Library of Medicine (US). (2018, June 28). Celiac disease.

    https://medlineplus.gov/celiacdisease.html
  12. Gale, R. P. (2020, September). Overview of cancer. Merck Manual Consumer Version.

    https://www.merckmanuals.com/home/cancer/overview-of-cancer/overview-of-cancer
  13. MedlinePlus: National Library of Medicine (US). (2017, May 22). Menstruation.

    https://medlineplus.gov/menstruation.html
  14. Office on Women’s Health. (2015, April 25). Your menstrual cycle.

    https://www.womenshealth.gov/menstrual-cycle/your-menstrual-cycle/#14
  15. Office on Women’s Health. (2018, March 16). Premenstrual syndrome (PMS).

    https://www.womenshealth.gov/menstrual-cycle/premenstrual-syndrome/#4
  16. National Institute of Diabetes and Digestive Kidney Diseases. (2021, June). Treatment for gas in the digestive tract.

    https://www.niddk.nih.gov/health-information/digestive-diseases/gas-digestive-tract/treatment
  17. Gotfried, J. (2020, March). Gas-related complaints. Merck Manual Professional Version.

    https://www.merckmanuals.com/professional/gastrointestinal-disorders/symptoms-of-gastrointestinal-disorders/gas-related-complaints

Learn More About Physical Health and Sleep

Woman balancing a contact on her fingertip

Can You Sleep With Contacts In?

By Lauren Fountain November 6, 2026

Pain and Sleep

Pain and Sleep

By Danielle Pacheco November 5, 2026

woman with headache

Can a Lack of Sleep Cause Headaches?

By Yazan Hamzeh November 5, 2026

Sleep Problems and Parkinson’s Disease

Sleep Problems and Parkinson's Disease

By Danielle Pacheco October 29, 2026

Allergies waking a woman up from sleep

Allergies and Sleep

By Elizabeth Rausch-Phung, MD October 29, 2026

Cancer and Sleep

Cancer and Sleep

By Eric Suni October 29, 2026

Multiple Sclerosis (MS) and Sleep

Multiple Sclerosis and Sleep Problems

By Danielle Pacheco October 21, 2026

Shoot of athletic woman cutting fruits and vegetables to prepare a smoothie while listening to music with earphones in the kitchen at home

Diet, Exercise, and Sleep

By Rob Newsom October 5, 2026

stock photo of a woman with sleeping mask

Beauty Sleep

By Yazan Hamzeh October 5, 2026