Doctor (MD)
Diplomate, American Board of Quality Assurance & Utilization Review Physicians
Overexertion depletes a muscle's oxygen supply, leading to a build-up of waste products (lactic acid) and spasm in any muscle that is overexerted including the calves, abs, and back which men exert during sex. In the absence of oxygen in a muscle this is called anaerobic respiration which does not release much energy and it produces toxic waste products. If oxygen is not available for the muscle it will produce lactic acid which will give your husband a cramp. He should breathe-in more oxygen during sex which will enter his muscles and eliminate painful muscle cramps. Aerobic exercises utilize breathing which prevents build-up of lactic acid. Remind your husband to "just breathe" then he will have more oxygen in his muscles and he will avoid muscle cramps.
When a cramp begins, the spinal cord stimulates the muscle to keep contracting so, of course, it is essential to "prevent" the muscle cramps in the first place. I recommend that you and your husband dedicate at least one specific day or evening every week to having sex and it should always be at the same time and on that one specific day of the week so that your husband can cancel any physically-challenging activities on that one special day and so that he can rest-up before sex. Allow him to spend the day resting prior to sex, perhaps watching his favorite hockey team on the TV or just relaxing by the pool or whatever before the "sexy" evening comes around. Don't expect him to have sex after competing in a hockey game or after performing a hard day's work (although he may desire it, he will most likely develop muscle cramps if he's not rested).
Heat, dehydration, and electrolyte depletion cause muscles to cramp. Muscle cramps are more likely when your husband has sex in a hot room because sweat will drain his body's fluids, salt, and minerals (i.e., potassium, magnesium, and calcium). Loss of these nutrients cause a muscle to spasm. Turn the air conditioner on in the bedroom so the room is cool while you have sex. Pour your husband a refreshing large ice cold glass of a sport's drink (mineral supplement) before sex.
Muscle cramps are very common among endurance athletes (e.g. marathon runners and triathletes) so don't make your special "sexy evening" an endurance event. Instead, let him satisfy you and then himself and then call it a night. He'll not have cramps because his muscles will not have built-up excess lactic acid and he will have sufficient rest and electrolytes prior to sex. Also, most important, both of you will be satisfied and eventually you will both begin to look forward to those "special sexy days".