Hips hurt while sleeping

Megan • 👶 🩵💙. 5 IUI’s❌. IVF Mom💉

This is my 1st baby and I have a pregnancy pillow. I am very comfortable going to bed but after while I wake up and my hip that is on the mattress hurts. I do have the pillow between my knees as well. Any helpful sleeping tips? I also heard no sleeping on your back either? Thanks