It seems like everyone’s covered the pain meds angle- so here are a few other options. Do you think something like Ambien XR might help? You shouldn’t really take it in combination with strong pain meds but if you’re dealing with the middle of he night ache so you can’t get comfortable & hurts to toss and turn vs. hard core pain, it may help you sleep through more of it.
Another idea, take a look at Orthaheel products. I’ve had back & knee surgeries in the past. Last time, I had back & joint pain, I tried them and they helped a ridiculous amount. If you’d told me beforehand, I wouldn’t have believed it either.
I know you have a heated blanket but you might try a heated mattress pad or the heated gloves and “slippers” you can get in beauty supply places. You know the kind they use for mani/pedis?
Unfortunately, I can completely relate to the anxiety about pain feeding into the pain.
Really random things I’ve found help with the 2am pain/stress combo:
Revisiting books/movies that I loved when I was younger- I can’t tell you how many times I’ve read Little Women, etc. when my back was bothering me.
Scent- Fresh flowers, scented lotion, a couple of cookies baked from the refrigerated dough- anything that feels homey to you.
Massage- Even if it’s just getting someone to rub your hands or rolling a tennis ball under your feet or over a tense muscle, it can help.
Hope I stumbled on something worth trying or inspired another idea. Sorry your having to go through it at all.