This problem is such a aggrevation... I seem to have to same problem but it only appears 80-90 miles in to a century and last for the rest of the day and maybe the next. I did some research after it last happened, and found the same thing that you were talking about...it's basically from high milage on your knees. I did talk to an "older" more experienced rider in my group about it one day and he suggested that I allow my clips to float as much as I could stand. This allowed me to change the position of my knee throughout the ride. Seems to have helped. If the pain is still there, see a sports trainer PT or someone of the sort, just to be sure. Hopefully is nothing serious. Then you will know for sure nothing is injured and you can find a way around the pain.
"When God takes something from your grasps, he's not punishing you, but
merely opening your hands to receive something better. Open your eyes to
the miracle right in front of you."