Haven't had knee replacement but I'm with you on the opioids. Can't sleep at all, they don't really do anything for the pain for me, make me itch all over and I get constipated. I just refuse to take them. I'd rather deal with the pain.
Good luck...