A good way to stretch your leg muscles is to start from the hamstrings: the muscles on the back side of thighs.
How? Lie with your back on the ground, squeeze you bottom and contract your abdominals so that your back completely adheres to the ground. Keep one leg either straight on the ground or bent, with your foot on the floor. Now lift the leg you want to stretch, flexing your foot as much as possible, until the point of tension; if possible, hold it with your hands.
Keep this position for at least 40 seconds, then gradually flex your leg further towards your trunk, at least four times. Keep each position for at least 40 seconds, with no interruptions.
Tip: if you can’t hold your leg in your hands, help yourself using an elastic band or a scarf.
Variation: you can also do the exercise standing and putting your leg on a step. Pay attention to keeping your back straight by contracting your dorsal muscles and abdominals isometrically and opening your shoulders.