Yes, I'm sure it's the opiates. They totally screw with your stomach and can bring on all kinds of weird issues.
I was taking tramadol in very high doses for years, and I was hospitalized four times, 5 days in the hospital each time, with an intestinal blockage that they never figured out what the cause was. Each time in the hospital they put a tube through my nose into my stomach to try and remove the blockage. After the fourth time, it never returned. They told me they couldn't figure out what was causing it, but I knew what it was. The opiates messed up my stomach so bad and I understand we have opiate receptors in our stomach in addition to the brain, so I knew what was going on.
I still had GI issues at 2 months out - not as bad, but they would still happen. Hang in there, they went away for me and I'm sure they will for you too. :)
Just yesterday, at day 13 clean, i was having the kind of stomach pains you are describing. I thought, geez, what did I eat. I never get pains like that, and they lasted for hours. It could be the painkillers, my stomach is still a mess from them too.