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.