And change your foot position too mate. If you usualy ride with your instep on the pegs try the toes instead etc. YOu know how your ankle bone is connected to you shin bone, your shin bones connected to your knee bone etc

Seriously tho, all those muscle groups can have an effect on each other and could be putting pressure on the tendons round your knee to take the stop cramping up or something like that.