On a more serious note,
if it has been prescribed, its probably for a good reason.
If you have sufficient pain at night that prevents you from sleeping, than it seems clear that not sleeping well would inherently hinder your ability to make gains.
To what extent opiods would limit muscle growth, I remember an article on various types of pain killers and muscle hypertrophy on this site, just can't seem to find it right now. In fact, I would bet that acetaminophen would reduce muscle growth relatively more than opiods.
Than again, what that really means in the real world vs a petri dish is difficult to evaluate.
Good Luck to you,