I just wrote these up for a friend of mine, so I thought I would share them more generally. I stretched the tendons in my left knee in a soccer accident in high school. For about a decade the knee gave way almost annually, which was very painful (I thought of it has having the knee go out of joint - it usually happened when bending and applying torque to the knee and I had to straighten my leg with my hands to get the joint lined back up). The last time that happened, I got physical therapy, and now as long as I do these exercises they taught me it doesn't hurt and it doesn't give way:
1) leg lifts. Bend your unaffected knee so that your foot is flat on the floor, even with your hip. Straighten the other leg, the one with the problem, and flatten your foot so that your toes are pointed at the ceiling. Maintain a sense of tension along the back of your leg with that flexed foot as you raise the straight leg to just under the height of that bent knee. Lower and raise again 15 times. Concentrate on contracting the small muscles behind and above the knee as you do this.
2) isometric down. Take a small towel and roll it up, to make a roll about 2 inches in diameter. Lie down with your legs straight, then bend the one leg a little and put the towel under your knee. Focusing on the glutes and the muscles on the back of the leg, gently but firmly press down on the rolled up towel for a count of four, then release. repeat 10 times.
3) isometric out and down. Put rolled towel under your knee, as before. flex your toes toward the ceiling and press the heel of that foot into the floor. You should feel that in your butt. Hold for a count of four, then release. Repeat 10 times.
Once you do it with the towel a few times to get the feel of what muscles are working, I find you can do it without the towel. The purpose of the towel as I understand it is to define the posture of the leg and the direction of pressing.