I would need to know more about what symptoms are being described as bloating.
If it is referring to constipation or an expanding abdomen, yes - many pain medications, especially opioids (hydrocodone, oxycodone, morphine, etc.) can cause the bowel motility to slow and therefore lead to constipation and what some people refer to as "bloating".
On the other hand, if the "bloating" is referring to swelling of the extremities, then some medications, including some opioids, but also medicines like gabapentin, some antidepressants and NSAIDS, can cause edema or swelling.
I would recommend speaking with your primary care provider or the prescribing provider to make them aware of these symptoms. A medication change may be needed.