Irritable bowel syndrome (IBS) is a chronic condition of the large intestines. It affects about 10-15 percent of people worldwide. It occurs more often in women and people under the age of 50.

Some people have IBS with constipation or IBS with diarrhea. Others experience alternating bouts of constipation and diarrhea. Even though IBS affects the intestines, this condition doesn’t damage bowel tissue or cause colon cancer.

Understanding why IBS occurs and getting treatment can reduce the frequency of attacks and improve your quality of life. Here’s what you need to know about IBS attacks and how to treat them.

Common symptoms of IBS include:

Some people also experience other symptoms like nausea, indigestion, intestinal spasms, and regurgitation. Symptoms of IBS may also worsen during the menstrual cycle.

Learn more about the symptoms of IBS.

The exact cause of IBS is unknown, but certain factors may trigger an attack. One belief is that weak or strong muscle contractions in the intestines bring on symptoms.

If you have strong contractions, food may pass through your digestive tract too fast, resulting in diarrhea. But when contractions slow down or become weak, stools are harder to pass. This can lead to constipation.

IBS may also arise due to:

  • inflammation
  • an overgrowth of bacteria
  • a bacterial infection in the intestines

Poorly coordinated signals between your brain and the nerves in your intestinal tract may also trigger symptoms.

Risk factors that contribute to IBS include anxiety or depression and having a family history of the condition.

The severity of an IBS attack varies from person to person. Symptoms tend to come and go over an extended period of time. When an attack occurs, symptoms may improve after a few hours or days. Some people, however, live with symptoms on a daily basis for weeks or months.

Your doctor may diagnose IBS if you experience stomach pain (related to a bowel movement) that persists for at least once a week for 3 months, or if there’s a change in the frequency and consistency of your stools.

Because IBS is a chronic condition, it may not go away completely. However, medication and lifestyle changes can help you manage the condition and reduce the frequency of attacks.

Avoid food triggers

What you eat could trigger an attack, so your doctor may suggest dietary changes. Foods that trigger IBS differ from person to person. But typically, foods and drinks that provoke symptoms include:

Try an elimination diet

It’s important to identify your individual triggers. To do this, your doctor may recommend an elimination diet. This involves:

  • removing certain foods and drinks from your diet
  • monitoring your symptoms for improvement
  • slowly reintroducing these foods one at a time

Keep a food journal to track what you eat and drink and log any IBS symptoms you develop. This technique helps pinpoint foods or beverages that cause your attacks.

An elimination diet might reveal a gluten sensitivity. If so, maintaining a gluten-free diet may improve your symptoms. If you introduce wheat, barley, or rye back into your diet, your symptoms could return.

Similarly, your symptoms may improve if you avoid high-gas vegetables like cabbage, cauliflower, and broccoli.

Watch for carb sensitivity

Keep in mind that an IBS attack might also occur if you’re sensitive to certain carbohydrates. These are known as FODMAPS (fermentable oligosaccharides, disaccharides, monosaccharides, and polyols) and include:

  • lactose
  • fructose
  • fructans
  • similar carbohydrates

Foods containing FODMAPS include:

  • onions
  • garlic
  • cabbage
  • broccoli
  • cauliflower
  • plums
  • peaches
  • apples
  • pears
  • dairy products
  • high-fructose corn syrup
  • fruit juice concentrate
  • sugar-free mints

If IBS interferes with normal daily activity, eliminating these foods may offer long-term relief. It’s important to eat a balanced diet, so speak with a dietitian before making any significant changes to your diet.

An IBS diet may feel restrictive, but plenty of foods are safe to eat. These include fruits with less fructose like bananas, cantaloupe, and grapes. Other safe choices include:

  • spinach
  • carrots
  • zucchini
  • quinoa
  • oats
  • sugar
  • maple syrup

Look into medications

If your symptoms don’t improve after making dietary changes, over-the-counter (OTC) and prescription medications may help manage your symptoms. A fiber supplement can ease chronic constipation. Your doctor may also suggest a laxative.

Managing an IBS attack can be challenging at night and while at work. If you have IBS with diarrhea, periodically taking an OTC anti-diarrhea medication can manage symptoms. Your doctor may prescribe a bile acid binder to promote solid bowel movements.

You can also talk to your doctor about medications to treat pain associated with IBS. Options include pregabalin (Lyrica) or gabapentin (Neurontin). Since anxiety and depression can worsen IBS symptoms, your doctor may also recommend an antidepressant.

Other medications for the treatment of IBS include:

  • alosetron (Lotronex)
  • eluxadoline (Viberzi)
  • rifaximin (Xifaxan)
  • lubiprostone (Amitiza)
  • linaclotide (Linzess)

Understanding how to prevent an IBS attack can help you cope with this condition. Here are a few tips to reduce the frequency of an attack:

  • Increase physical activity to regulate intestinal contractions and ease constipation. Exercise for at least 30 minutes 3 days per week.
  • Eat at the same time every day to help regulate bowel function.
  • Keep a food journal to identify trigger foods.
  • Slowly increase your fiber intake to ease constipation. Too much fiber can cause diarrhea.
  • You may also wish to try probiotics. Increasing the good bacteria in your digestive tract may relieve symptoms of IBS. Take probiotics as a supplement or eat yogurt containing probiotics.
  • Drink peppermint tea or take peppermint supplements to ease intestinal spasms.
  • Learn how to manage stress. Practice yoga, meditation, or mindfulness, or find enjoyable activities to minimize stress and anxiety.
  • Try out acupuncture. This complementary therapy might relieve IBS symptoms.
  • Consult a hypnotherapist and learn ways to relax your abdominal muscles. This may reduce symptoms of an IBS attack.
  • Explore your thinking patterns through cognitive behavioral therapy. This technique teaches you how to replace negative thought patterns with positive ones. Clinical trials have found that this technique can provide “significant and long-lasting improvement for IBS symptoms.”

The symptoms of IBS can affect your quality of life and prevent you from doing the things you love. But relief is available.

Talk with your doctor or gastroenterologist if you’re unable to manage your symptoms with dietary changes. You may need medication to address your symptoms.

It’s also important to see your doctor if you experience other symptoms such as weight loss, rectal bleeding, or difficulty swallowing. These symptoms could indicate a more serious condition.