As a disclaimer, I typically don't have leg cramp issues, myself, but on the rare occasion, I get them for two reasons. One is just a precursor to injury. I'm going out too hard and my legs are not happy. That usually doesn't occur for me on long runs because I'm not at the top end of my speed, anyway. The other reason for me is basic dehydration. I'm not a doctor or trainer but for me, hydration seems to be more than 50% post workout. In other words, I need to get most of my hydration after a workout. After that, it's a matter of keeping up with normal activities. If I cramp up from dehydration during a workout, it could be because I either did not post hydrate well the day before and/or didn't keep it up or I lost so much during the current workout that my body is starting to warn me to take it easy. I typically don't have hydration issues, anyway, but that's what it would be if I cramped up. But once it happens, it has a dramatic effect on performance, so get plenty of fluids in you post workout after the workout before your long run and keep it up until the evening prior. Taper a bit before you go to bed so you're not up all night running to the bathroom. By the evening before, your cells have passed the period of time they are accepting into their extended range tanks, anyway so if you keep drinking a ton, you're just going to be using the bathroom a lot. If this doesn't help, maybe someone else'll chime in with something.