This is because opioids cause constipation. Counter with diet and frequent doses of Miralax. Learned this the hard way after mt first surgery. Bloody doctors and nurses HAD to have known, but didn't bother to tell me.
Constipation is a well known side effect and it’s listed on that sheet of paper your pharmacist almost certainly provided when you picked up that prescription.
Yes, I know all about it and took meds to counter the issue both prior to and while taking opiods, it just didn’t help me very much.