As long as you keep your filter media wet while you do the substrate change, you shouldn't totally kill the cycle--only part of the bacteria live in the substrate anyway. Changing water certainly won't kill your cycle.
I've never done it myself, but if I was going to do it, I'd remove all the tank inhabitants (fish and plants alike) and keep them in a bucket of tank water, float the filter media in the bucket with them with an airstone to keep the water moving, then empty the tank and put the sand in, replace ornaments and plants, refill from bucket, add fresh water, and voila. I'd check water parameters daily for a little while 'cause the bacteria in the gravel would be gone so the readings might not be perfect right away, but since the filter media will have been saved, I wouldn't worry about crashing the cycle.
'Course as I said I've never done it, so wait for the experienced replies, heh.