When you say leg pain, you should consider the traction pain caused by muscle strain or obvious position change, but it can be improved by local massage, and then observe whether there is local swelling and so on
Suggestion:
Combined with the recent problems such as trauma, if there are no such problems to be considered and the muscle traction injury caused by your sudden exercise, attention to rest and hot compress can be improved.