Hip pain

So at night I wake up every other hour or so in pain from my hips, having to lay on my hips is hurting so bad but I'm 30 weeks and can't lay on my back anymore without feeling like I'm about to black out. 
I sleep with a pillow between my legs and switch sides to give each hip a break but I'm losing sleep over it. I'm about to quit and sleep in the recliner at this point, any tips?