I've got to say... I feel your pain! The sleeping on your back thing is THE PITS, it does get a bit easier (quite a bit really) as your general discomfort eases and relaxing at night becomes more "do-able". It was the bain of my life for a while there, the one thing I was "counting down" for

I wasn't even "allowed" to elevate my leg at night... some nights I just DID elevate and it was easier, I did two nights where I just HAD to sleep on my non operated side with the pillow between my legs for sanity's sake - it was heaven (especially the second time as I then knew that the operated leg wasn't going to fall over to the bed crossing the midline) I did reserve this "treat" for when I felt I absolutely couldn't cope with not-sleeping on my back.
I decided to make it "my cross", to sleep on my back - and believe it or not - once I stopped fighting it - made that conscious effort to relax into it instead of all that negative self talk "I'm never going to get to sleep", "this is a nightmare"... you know, all that stuff YOU said last night

it GOT EASIER... honestly! I could hardly believe it myself

I found the meds enough to get me to sleep in the first place, but the getting BACK to sleep after the middle of the night pitstop was harder... it's when deep breathing and relaxing music really got a workout. Even on the nights I didn't get a lot of sleep, the time was better spent relaxing than fighting it - rest is rest.
To be fair, a lot of people on Bonesmart have "sleep issues" post op regardless of whether they have to sleep on their backs or not!... I have "sleep issues" at the best of times, mine ironically were no worse after the op than they have been for years - apart from the being on the back thing
Hope it gets better, if it really is causing you great distress, discuss it with your OS and see if you can spend some time on your side... point out that quality sleep is an essential ingredient of recovery too, maybe he can advise you of the "safest" way to side sleep