Pain-testosterone levels and cortisol

I just had l-5 s-1 back surgery about 8 weeks ago. I was in pretty bad pain for three weeks after, now the pain has diminished in my back and only feel pain in my foot and left leg. Was wondering how the pain and narcotics has affected my testosterone levels, they feel real low and I am getting fat as hell. Would pain lower my test lebvels and how can I get them back up. The seven days I was in the hospital on demarol I lost 25 pounds over the past eight weeks I have probally put 15 pounds of fat back on. Any help?