Painful leg knots in last trimester! Help!

I'm almost 38 weeks and have such painful knots throughout both my legs in my thighs and carves, it's getting to a point where it's keeping me up at night as I can't lay on my side for comfort to get to sleep. Any suggestions on what I can do to help relieve the pain?