Several causes of pain behind the knee.
I assume no recent trauma--you may have a baker's cyst
--basically a collection of joint fluid extruded outside of the joint and formed sack there behind the knee...As it enlarges, it can cause pain and reduces ability to bend the knee.
A bit clot in the back can do so as well, but you don't have other symptoms to suggest that.
Consult your doc.