I’ve had this a couple of times over the last few years, probably one of the most painful things I’ve ever had. The inside facing end of the top half of the leg, just at the knee, contracts hard leaving the leg unusable and me on the floor for a couple of minutes until it stops and then another few minutes until I can get up. Tends to happen towards the end of a long ride, on a low gear climb or if I get my gear selection wrong and strain myself trying to ride it out.
Been fortunate enough that it’s always happened in a safe place where I could stop and get on the floor quickly if not gracefully. Now I’ve learnt to spot the early hint of it happening, and just walk for a few minutes which seems to allow everything to settle down.
But what might be causing it and what adjustment or exercise would help?
Riding flat pedals and 165mm cranks. I wear IXS Flow knee pads, the top elastic is over the affected muscle but it’s not particularly tight.