Lying flat (or if your legs go into spasm - lying with knees bent up and feet flat on floor/bed).
Roll knees over to the left, stretching diagonally across the trunk.
Bring them back to the middle.
Then roll the knees over to the right and back to the middle again.
Make sure both shoulders stay in contact with the floor or bed.
Repeat 3-5 times each side.
Don't rush and make sure you don't let your knees flop!
If you have problems/concerns, talk to a physiotherapist