Many of the drugs we prescribe, especially opioids can cause constipation.
Here are a few tips from Healthline and a journal article.
The 3 keys to avoiding constipation is
It is best to treat constipation before it happens.
There are many fiber-rich foods that one can eat to treat constipation. Fruits like apples, bananas, prunes, pears, raspberries, and vegetables like string beans, broccoli, spinach, kale, squash, lentils, peas, and beans are often recommended. One can also eat almost any type of bran products (usually cereals) and nuts. When eating foods with fiber, it is important not to consume more than 25 to 30 grams per day otherwise it can lead to a bloating sensation. Avoid anything with psyllium. This mainly adds bulk to the stool and can increase pain.
Eliminate trigger foods from your diet. Fatty and processed foods are difficult to digest and may make OIC worse. Limit your intake of trigger foods, such as fast foods and junk foods.
Over the counter medications such as Milk of Magnesia (about 2 tablespoons per day), or Magnesium Citrate liquid solution may be of benefit.
Prescription drugs include
Senokot: This is a mild laxative.
Colace: This is a stool softener and is generally only helpful in preventing constipation.
PEG: Polyethylene glycol 3350 is in a class of medications called osmotic laxatives. It works by causing water to be retained with the stool. This increases the number of bowel movements and softens the stool so it is easier to pass.
Opioid Blockers: There are new medications which block the effects of opioids in the gut. These are considered a last resort and should be discussed with your doctor.