If I remember rightly you've got some hamstring insertion points by the popliteus. I've had trouble in this area myself. General hamstring stretches helped me but what helped me most was foam rolling the area at the back and above my knee whilst pointing my toes to work the muscles either side. It really depends on what is causing it though. What worked for me may not help you but I have definitely found that most pain in and around the knee is caused by other muscle groups affecting the insertion points around the knee and most muscles insert there so it's no surprise.
I'd tried several physios and GP referrals before I bought myself a book, the anatomy of stretching, which illustrates all the muscles and what stretches help them and also watched some youtube videos on foam rolling and bough myself a foam roller, a stick roller and some pressure point balls. All this got my left knee working again and recently sorted out my right knee. However I also had patella tendonitis in my right knee and nothing but time and drugs sorted that. So if it is tendonitis, then only rest will cure it and a slow return to excercise. It's taken 3 months for my tendonitis to settle.