Leg problem

When I sleep on my side my outer thigh gets really sore so I move to my right and then my right gets sore it’s a constant thing all night long is anyone else having this problem and if so how to stop it