Leg pain while I sleep

Destiny

I literally keep waking up from awful pains in my leg while I sleep on my side. It’s on both legs too! Only relief I get is sleeping on my back which I am not used to whatsoever. It feels like I’m not getting enough blood around my legs, like bad circulation. Anyone went through this and how did you fix it? Next week I’ll be 6 months pregnant and can’t imagine going through this the rest of the pregnancy. Any advice would be great! Thanks!!