My quick answer: Do not cross your legs while sitting.
The long one: I know, it looks really lame! The famous article explains exactly what used to happen to me and how I used to recover (ramping up slowly...). Trying to prevent it was a different issue. Nothing I did correlated with or stopped this from happening. Stretch or not (before and/or after), hydration, warming up or not (before and/or after), compression socks, deep tissue massage, the stick, rest, no rest, change shoes, physio...). Whatever I did, I would get one every 3 to 6 months for almost 10 years. Boy that was frustrating.
Then, one day, I realized that when I cross my legs, left over right, the right knee puts pressure on the left calf, right on the spot where I was getting the problem (by the back of the left knee). I used to spend all the day sitting and crossing the legs was a natural way. Also, funny enough, I never cross the right over the left and hence I never had that issue with my right leg!! I stopped crossing my legs 2 years ago and I have been free of that injury since then! This so far seems to be the only correlation and certainly I am not planning to cross my legs just to check it is not!
PS.: The only other thing may had been a butt stretch (the kind that you bring your bent leg to your chest). But I think that wasn't working either in the past. The crossing the legs really seems to be the one.
PS2.: It would be interesting to know if the other folks with this problem do have a position where they put pressure over long periods of time on the spot.