Hi Felt-Rider
Ross Tucker here, from the Science of Sport. Sorry for the delay in replying, been busy at those other posts, which are causing some fatigue of their own!
I think that conditioning is a major factor. A study was published last year by Collins and Schwellnus et al. that looked at factors associated with cramp, and three of them are all indicative of conditioning being "inadequate" for the level of performance being attempted. They were: Racing, going further/longer than ever before, and much more challening terrain than is encountered during training.
These are all, no doubt, obvious, but they all point to fatigue as a cause of cramp - as we discussed last year in our cramp series, the new theory for cramp is that it's caused by a "malfunction" in the nerves and reflexes that control the muscle. The post is here:
http://scienceofsport.blogspot.com/2007/11/muscle-cramp-part-iii.html
This is made far worse by fatigue, and so my suspicion is that your problem is related to fatigue, brought on by "weak" muscle at that late point in your rides.
One thing that might help is to anticipate the cramp and stretch in advance. You'll recall (or can read that post) that cramp is alleviated by stretching, which restores the "normal" reflex control of the muscle. So I believe that stretching in anticipation of cramping may assist you slightly, and perhaps even prevent the cramp from occurring!
Hope that helps a little!
Ross