Right leg pain during sleep

Co
I am 22 weeks pregnant and have noticed the past few nights, I have been waking up to my leg hurting, it's a dull and achy pain. A few nights before this started I had the worst charlie horse in the same leg. I have been putting a pillow in between my legs, I try not to sleep on my right side, so that my weight is off that leg, but nothing is helping. Anyone have this and know a way to ease it?