What you need: Bed/Flat surface & belt/towel or dressing gown
Sitting up bend your unaffected leg. Loop something like a belt, towel or dressing gown around the foot of your affected leg. Use this to help you bend and straighten your knee as far as you feel comfortable going.
Try to keep the heel of your affected leg on the bed throughout the exercise.