The only time I ever get leg cramp during a ride is with fatigue near the end of a very long, hard ride. I do quite often get cramp after a long ride when I get off the bike and sit down for a while. This often happens in the evening when I’m sat down for dinner. Fatigue is always the trigger for me. I can’t remember ever getting cramp with relatively fresh legs. So cramp 2 hours into a ride would be very unusual for me and sounds unusual for the OP given their riding history and sudden onset.