Zen's suggestions are very good and I would also suggest you try this:
http://www.easyvigour.net.nz/fitness...xorstretch.htm
It's listed as a hip flexor stretch but really, part of your quad functions as part of your hip flexors and is often the muscle that needs the stretching the most. You can intensify the stretch to the quad by propping the back foot up on pillows or a low stool.
The key to avoiding the cramping is to have the foot supported so you don't have to try to hold it or get it into position using your leg muscles. That and keeping your low back flattened by initiating a pelvic tilt which Zen mentioned and is also described in the link I posted above.
Living life like there's no tomorrow.
http://gorgebikefitter.com/
2007 Look Dura Ace
2010 Custom Tonic cross with discs, SRAM
2012 Moots YBB 2 x 10 Shimano XTR
2014 Soma B-Side SS