how do i stop getting pain en my rite leg upper thigh

It started hurting about 4am waking me out my sleep its the mussle end my upper thigh what do I do to stop it