I have lifted weights extensively on opioids. Seemed to hinder me much, and perhaps in some ways helped me gain muscle mass by increasing my appetite (opioids increase my appetite quite a bit which is helpful since I have a pretty poor appetite). When I reached my biggest size, which was quite large and lean, I was taking around 1,000mg of tianeptine a day, which I'd equate to maybe 160mg/day of oxycodone in terms of equivalent stength.
This is me on ~1000mg/day of tianeptine. No steroids, just tianeptine and 75mg-100mg of ephedrine a day (do not think its ok to take this much ephedrine a day, I'm lucky I didn't have a heart attack). My testosterone measured quite high during this period, in the high 900ng/dL range. Who know what it would have been without the tianeptine. I do think the tianeptine helped the muscle gains by increasing stamina in the gym but more so by increasing my appetite.
Note I am no longer that size, although i retained a good deal of it. In order for me to keep that size requires 1.5 hours in the gym 6 days a week, and a ton of food, neither of which is practical or maintainable in the long run (especially since I try to avoid daily intake of opioids).
I have not, however, lifted weights much when I was a heavy IV opioid user. I did however do alot of weightlifting when I was tapering off my 380mg/day methadone habit. The weightlifting really helped me through the tapering process. Also I had gained maybe 40 pounds of fat while on methadone, which was very atypical for me since I have always been lean. I'm not a big food person, but never have I enjoyed food in my life like I did while on methadone. I'll never enjoy food like that again. I didn't know food could taste that good.