I have gone through the same thing before 1 year and at that time, I was suffering from body pain and couldn't able to sleep at night. But, I would like to thank "Pregnancy Pillow" which have been a gift for every mother at the time of pregnancy. It is very much beneficial to stay away from body pain and get a smooth sleep at night. It helps to find a relaxed sleeping position.
I'm 36 weeks and find that having a pillow between my things and another one between my ankles with the top leg being in front of the bottom and angling my body like I'm trying to sleep on my stomach helps a lot even though I do switch from my left to right sides throughout the night. I sleep pretty well only waking to pee
I sleep on my back legs chris crossed Indian style with a pillow under them to help bring my legs closer to my belly, sitting up a little cause of the bad acid reflux
I'm 33 wks & went to a chiropractor today. I've had trouble sleeping due to lower back pain & my right hip started to ache yesterday. I already feel relief from the hip ache & my lower back feels better too. You might try to find a good chiropractor in your area. He even showed me a couple easy leg movements to do that will help with keeping the aches away. He said if I feel I need to come back that I can, but he thinks the movements will help a lot. It was great having an appt where the dr didn't try to get multiple appts & co-pays scheduled right away lol. Plus I felt better just walking to my car when I was leaving!