
Starting position with feet free to swing and the bad leg as relaxed as possible, probably a lot less flexed than in this example.

Use the good leg to slowly push the bad leg into further flexion.

Hold the position for a few seconds before relaxing, and repeat.