Had this too recently.
Back of the knee and near the hamstring. Are you talking back of knee as back of leg or behind the kneecap?
Strengthing the quad holds the cap better but not the back of the knee.
My fault for riding too low, upped my seatpost but still too low but I forgot about the layback! so my saddle was further back even though less stress on the front of the knees.
Will move my saddle forward a bit with a plumb line etc knee and ball of foot and cheers for spd tip-mine feel loose and need tightening up.
Have you done any changes before the pain Soup?