Did you stretch before? I know it's really "gym teacher" of me but it stretches your muscles so that your muscles don't tear. I just tore my forearm, couldn't even open a can without pain, but like everything it heals. Torn muscles you just have to wait out, if it continues for a couples more weeks I would go to the doctor. Other than that rub your legs with some oils.
it could be several things, it could be that you tore a muscle or you burst a vein..if the pain is bad and you are concerned go see your doc..