I think I might actually have something useful for you here if you get a lot of cramps. Much of this applies to other cramps, but legs were (and are) the worst for me. Despite massively painful incidents for me and my basketball players, no one ever told me much of this stuff. I am passing it along in hopes that it helps.
First and immediately, if you feel a leg cramp coming, you need to use your own muscles in the foot, ankle and entire leg to straighten your leg and pull your toes up toward your knee -- and do this with all of your strength without giving up or giving in!!!! You have to jump on this with all of your quickness, strength, determination, and perseverance -- even if it doesn't seem to be working. Persevere and try even harder until you beat it!!! I am calling this the "toe pull battle" -- and it is a battle! (But you can win!)
Unlike the "straighten it out and stick with it" or "try to put massive amounts of weight on it" methods, this requires you to consciously pull that toe up and stick with it. Do not use your hands to pull back on your toes unless you feel that it will help. Use your own leg muscles and overcome the cramping. This may involve a few minutes of pain, but it is nothing compared to the cramps. If you get quick enough, you can catch the cramp before it grabs you badly.
Don't give up, either. It's often painful, but this does work in most cases. Add these methods as well while you are fighting -- especially the mustard:
These are very good and listed in order (and all can also be considered "preventative" if you think you might be susceptible due to extreme exertion):
Mustard. You can buy very small bottles of mustard for around two dollars each. Buy about 12 of them and put them everywhere. Put one in your gym bag, locker, car, bedside table, book bag, tool bag, etc. Make sure you know how to get the cap seal open very quickly. When you have a cramp, shake the bottle, open, and squirt a healthy dose into your mouth. You will be very pleased with the results in a few minutes.
Water. This is also highly featured and stressed under "preventative" below. It won't help quite as fast as the leg muscle strength battle or mustard, but lack of water is the main root cause of your cramps and lots of water should be consumed as soon as possible as things are calming down.
Hyland's Leg Cramp pills. These aren't expensive and they dissolve in your mouth quickly. Put a few under your tongue (and keep it very moist with saliva) for faster absorption into your blood stream. Here are the ingredients, "Hyland's Leg Cramps uses multiple homeopathic active ingredients, including Aconitum Napellus 6X HPUS, Cinchona Officinalis 3X HPUS, Gnaphalium Polycephalum 3X HPUS, Ledum Palustre 6X HPUS, Magnesia Phosphorica 6X HPUS, Rhus Toxicodendron 6X HPUS, and Viscum Album 3X HPUS. The inactive ingredients are lactose and acacia gum." You can also take a few of these prior to getting a cramp if you think the circumstances are ripe for a cramp.
Electrolyte replacement powders with water. These are available with minimal sugar calories but you generally have to mix them yourself. You can get individual pack, pouches, cannisters, etc. The water may be the key ingredient, but the electrolytes can't hurt. Some of these are mainly salt, however, so try to avoid those. Tons of salt just really isn't good for you.
Gatorade or equivalent. Personally -- just be aware that regular Gatorade is full of sugar calories. However, it has electrolytes that may help and the water definitely helps with dehydration.
Massage. Try rubbing it out or have a trainer help. While this generally feels good, it is usually a longer process and often requires another person. Do combinations of 1-6 above as well.
Theraworx. I just recently discovered this myself, and it is available in almost all stores that sell medicine of any sort. Again, I am not getting paid to advertise this. It is simply a very effective product. I used it to release the muscle pain from a very severe cramp. The roll-on version doesn't get your hands in it -- although it's not a big issue since this is greaseless. I am not going to travel or stay anywhere without access to it in the future. https://theraworxrelief.com/how-to-use/ Their website also recommends heat, warm baths, and soaking in epsom salts if you have severe residual muscle pain.
OK, now that you are done with the urgent stuff, here are some pointers to keep this from happening as frequently in the future (and, again, the 'urgent' remedies above can all be used as preventative as well):
Water, Water, Water!!!
Stay very hydrated. Water is so good for you! It is free and will help you athletically and mentally. Generally don't drink "sugar water" like standard Gatorade -- you don't need the empty calories or expense. You can find good no-calorie drinks with electrolytes -- but the key is just plain old water.
I am mentioning water twice in this article because it is so important!
(Nothing to do with cramps, but: If you fall asleep in class or meetings, just try drinking more water. If you want to be sharper for a big test or big meeting, drink some water. If you drink too much alcohol at night, drink more water before bedtime to minimize a hangover. If you are trying to lose weight, drink some water every time you think you are hungry instead of snacking or bingeing.)
Bananas
Eat bananas for Potassium -- which works somewhat and they are good for you.
Magnesium+
Google "magnesium pills" or "magnesium gummies" for several alternatives.
Take a few before going to bed if you have had a super strenuous day. Take a few before a big practice or big game/race. Be aware that too much Magnesium sometimes results in loose bowels -- not a plus if you are in athletics or working in the field.
Pickle juice. This has about the same effect as the mustard, but it is harder to actually have pickle juice around to use in a hurry. Duke Basketball apparently uses this, but you probably don't have a trainer, cooler, etc. like they do. This would be high on my list if I thought you all might have a ready source of pickle juice on hand during a ball game or by your bedside for night cramps.
Take salt pills -- which don't work and aren't good for you.
People told me to take Quinine and Quinine water -- which seem to work but also seem to have negative effects on your health. Check with your doctor if you plan to try this -- but why bother with all of the other remedies available?
Rub CBD, Blue Emu, Aspercreme, Amish Oil, and other creams -- which all work fairly well. Try the Theraworx if you haven't tried it before. For me, it just works better.
Try combinations of the above to see if they can help.
Sorry if this advice seems too simple after all of your struggles your whole life (mine too), but the "toe pull battle", mustard, and water strategies are probably all you are going to need 99% of the time.
So, I hope you will find this helpful. I have had so many painful incidents with cramps that were, now that I know the above, not necessary. You really don't need to miss large parts of a key game or event if you will drink water and be ready with the mustard as mentioned above. Worst case, your instant reaction and strength with the "toe pull battle" will keep the cramp from debilitating you and get you back in the game.