I'm a junior doctor with a complex medical condition, which affects my joints, gastro system and cardio system. I get a lot of pain and often it is worse and or I'm more aware of it at night.
Some nights if my pain levels are too high I accept I might not sleep and aim instead to rest, to get my heart rate down (wrist based monitor) and calm my nervous system. This contrasts to years ago when I'd ended a desperate sobbing mess thinking how will I cope, I have to sleep I have x or y tomorrow. So...progress! I use several apps including Calm, which offers sleep stories as well as actual meditation. Another one takes you through breathing exercises to help you calm your nervous system and I do see a drop in my heart rate. I also practice mindfulness techniques from Breathworks, such as body scans and progressive relaxation.
The thing that I can't live without is my heatpad, like a mini electric blanket - it is very soothing for aching hips but also can sometimes release spasms.
As well all this I've found things like my snoozle really helpful - it's a small silky slip sheet that makes turning in bed so much easier if you have limited strength or pain in your hips/lower back. My most recent addition has been a weighted blanket. I've found I fall asleep more easily and also have less of the "jumpy legs" I often experience if I overdo it.
I recently discovered that ibuprofen comes in slow release and that seems to help me too. I feel like finding all these helpful strategies and tools has been a process of ongoing research and it's trial & error or luck of someone mentioning something! So many of the things that help me were mentioned in passing by someone I knew with pain or resulted from a Google search when I was in pain! That includes the weighted blanket, also the magnesium spray I use and those slow release ibuprofen.
My sleep disruption is difficult for my partner too as I have to turn a lot on the night. I do seem to turn less now with the weighted blanket though! But also getting up to go to the bathroom or to get on my yoga mat to stretch out a spasm all disturbs him! As he said once on a group holiday "when Emily has a bad night so do I". Luckily yes supportive but it does add pressure for both of us.