Marijuana and opiates shares receptor sites at a protein level. By sharing similar receptors, Marijuana and Opiates can work synergistic with one another. Marijuana can stimulate pain relief just as an opiate would. Opiates however have more receptor sites that when agonized produces more of an analgesic effect. When someone is using Opiates for pain and consumes marijuana, the effects of the opiate is potentiated.
If you use an opiate for pain, consider consuming marijuana with it to lessen the use of opiates which is addicting. Opiate abuse remains a nationwide pandemic.
You can taper yourself off opiates with cannabis consumption. Start slow and carry on.