Lie on your unaffected side and hug the knee of the bottom leg.
Bring your top leg up to the same position, so your knees are together.
Grab the top ankle and pull your leg back until you feel a stretch in the front of your thigh, deep in the thigh muscle.
If you cannot grab your ankle, use a belt wrapped around the top of the foot to assist with the stretch.