See A-Z of rehabilitation exercises
If you are unable to view the video, here is a still sequence of the exercise -

Lie on your side on a firm surface. The leg to be exercised is the lower leg which is stretched out, while the upper leg is bent and helping you to balance.

Lift up the lower leg.

Bring the leg across as far as you can.

Then lower the leg down again.

Repeat the sequence 10 times.