Here is a great article on muscle cramping. Not sure it will apply to your case but it's good. Get flexable!!!
http://www.mxconditioning.com/2009/05/muscle-cramping/
It was me who recommended the Salt Stick Caps. I have used the Hammer Endurolytes and for me anyway the Salt Stick Caps work better. I only use Hammer Heed energy drink in my Camelbak because it works and causes no stomach issues for me. If you sweat allot water alone wont cut it. BTW, each Salt Stick Cap has 11mg of magnesium. Take 1-2 max per hour of activity.
http://www.saltstick.com/
I'm no expert but at 4-5 hours you need to be fueling your body very different from 1-3 hours. Crazy stuff starts happening to your body. Might want to try the Hammer Perpeteum Extreme Endurance Fuel. Stuff is for prolonged endurance type events. Must be kept cold or it will go bad (some freeze it to last longer) but you can carry it as a powder and just mix it with some water during a break.
http://www.hammernutrition.com/produ...-energy-drinks