“Research shows that people with ulcerative colitis who get more sleep are less likely to have a flare,” says Neilanjan Nandi, MD, a gastroenterologist at Penn Presbyterian Medical Center in Philadelphia, Pennsylvania. That said, getting a good night’s sleep isn’t always easy, especially for people with UC. Symptoms such as abdominal pain, cramping, and frequent bowel movements can keep you up at night or rouse you out of your slumber, which can then cause your symptoms to flare up again. A study published in January 2020 in the journal Scientific Reports found that as many as two-thirds of people with inflammatory bowel disease (IBD) experience sleep problems, and that poor sleep is associated with decreased quality of life, increased disability, and even extraintestinal manifestations (EIMs) — symptoms of IBD that affect other areas of the body, including the joints, skin, bones, eyes, kidneys, and liver. The good news is, once a person’s UC is under control, they’re likely to sleep well at night too. According to Stephen B. Hanauer, MD, medical director of the Digestive Health Center at Northwestern Memorial Hospital in Chicago, people with well-controlled UC are no more likely than the general population to have sleep issues. Here are some tips to sleep easier. Eating early is good advice for everyone, whether or not you have IBD, says Hanauer. “The worst thing you can do is eat a big, fatty meal before you go to bed, because then you’re going to have heartburn and indigestion,” he says. “Make your last meal of the day a light meal.” Your doctor may also recommend taking an antidiarrheal medication before bedtime, says Hanauer. But as with any medication, you should never take it without consulting your doctor first.

2. Talk to your doctor about pain or cramps.

Ideally, your UC medication will relieve your symptoms, including pain. But if you’re still experiencing abdominal pain or cramps — and it’s keeping you awake at night — your doctor may tell you to use acetaminophen for pain relief or an antispasmodic for cramps, says Hanauer. One pain reliever that’s not recommended: over-the-counter nonsteroidal anti-inflammatory drugs (NSAIDs), such as ibuprofen. They can irritate the small intestine or colon, says Nandi, possibly worsening your symptoms during a flare. Nandi also recommends placing an electric heating pad on your stomach for relief.

3. Try a different sleep position.

You may feel more comfortable sleeping on your left or right side, depending on which side of your colon is most affected by your condition. Nandi says sleeping on your back may also provide relief but recommends experimenting with different sleep positions to determine what works best for you.

4. Be aware that steroids may cause sleep problems.

Corticosteroids, which act as anti-inflammatories, are commonly used to manage flares, according to the Crohn’s and Colitis Foundation. But according to the National Sleep Foundation, corticosteroids, which are stimulants, can interfere with sleep. “Sleep disturbances are common in patients who are on steroids,” says Hanauer. Fortunately, these medications are typically used as short-term treatments, and once your disease is controlled and you stop taking steroids, your sleep issues should improve, says Hanauer.

5. Treat any underlying anxiety and depression.

The symptoms of UC can take a toll on a person’s mental health, sometimes leading to anxiety and depression — two conditions linked to a higher risk of sleep problems. In a study of 47 people with ulcerative colitis, published in October 2018 in the International Journal of Behavioral Medicine, researchers found a link between poor sleep quality and depression. The study authors noted that when developing a UC treatment plan, it’s important to take sleep and mood into account. The Scientific Reports study also noted that doctors should track during regular visits how well their UC patients are sleeping and that people may benefit from working in tandem with a gastroenterologist and psychologist to improve their sleep and quality of life.

6. Practice good sleep habits.

General tips to improve sleep, such as limiting screen time, can be helpful for people with UC. “[Being online] is a common way to distract yourself from discomfort, but it can also keep you from falling asleep,” says Nandi. Plus, it interferes with your sleep quality once you do finally fall asleep, according to a study published in November 2016 in the journal PLOS ONE. Researchers think electronic devices’ blue light suppresses the production of the sleep hormone melatonin, which would otherwise cause you to become drowsy. Try to keep your smartphone and tablet out of the bedroom. If you like to read before bed, stick to paper books or a reading device that doesn’t emit the problematic blue light. Other smart sleep habits: Keep your bedroom quiet, cool, and dark, and stick to a regular sleep schedule. You may also want to try doing some soothing activities at night, such as yoga or meditation, says Hanauer.