It's likely you're going to come across this if you haven't already.
Let's look both at prevention and cure of cramp.
First of all make sure that the riders have an effective bike setup. If handlebars are higher, the rider can end up using calves more and larger muscle groups less. Coupled with incorrect pedalling technique you can be more at risk of cramp. Make sure the rider is not riding with toes pointing downwards – encourage riders to pedal so that...
their foot is flat as they are approaching the bottom of the pedal stroke.
Encourage hydration – both before the session and afterwards. Hydration and suficient intake of electrolytes (potassium and magnesium) reduces risk of cramping muscles.
Don’t skimp on warm up before the session. You want well-perfused muscles before you start working.
Don’t skimp on the cool down and stretching either. Cool down for a few minutes with gentle pedalling before stretching. Stretch the main muscles used (glutes, hamstrings, quads, calves), focus on one group at a time; don’t try to stretch hams and calves at the same time.
Relax into stretches, don't bounce, and allow riders enough time to find the stretch and then gently relax into it. Around 30 seconds is good.
When riders want to dash off early after class (and miss their cool down) it's good to remind them that effective cool down minimises the risk of cramp.
Get the rider to stretch out the muscle on the bike if possible. Somestimes cramp pain can be so sudden, it can be difficult to dismount, so stretching out while on the bike might be easier.
Stretch all large muscle groups used, and allow riders to focus on any problem areas they may have.
Once the pain is relieved, advise a soak in a warm bath afterwards, or apply a heat pad to the affected area.
Follow up on the rider. Check in on them if you have their contact details - let them know you care.