I've never had any leg cramps when riding, but I have been battling for a few years where the muscle in my inner thigh goes off later that evening. Sometimes completely incapacitating me. My wife thought I was having a heart attack the first time. This year, I have been using an electronic NEMS unit on my leg after rides, and hydrating more. I'm happy to say, it's been at least two months now since I have had an attack.
The first time it happened, three days later, the inside of my leg from my groin to my knee was completely BLACK! The sports trainer where I went to try to sort this out believes it was a lack of hydration in my muscles. So I drink a lot during the day. Yes, I do drink coffee, and I doubt I will give that up, but I do not drink alcohol, so I need some vice
One of the places I bike is through the public park, but now they have all the bathrooms locked