This problem does not necessary start with cramps or heat exhaustion. You can go from working out to having a heat stroke. One of the most known problem is when exertional heat cramps can strike very suddenly and cause the effected muscle to become ridged. This can be vert painful and any more exercise cannot be performed. There are many thoughts on what causes heat cramps with the most likely being an electrolyte imbalance in the effect muscles. Sodium and potassium help the body hold on to more of the fluid that you have consumed. This is extremely important for you especially when you are sweating out fluids during work outs or working in the heat and humidity.
Water is not always enough since it does not contain electrolytes to rehydrate with if you are sweating out fluids. You also need to drink some kind of sports drink since they are fortified with electrolytes. If you are cramping the first thing to do is relax and try to stretch out the effected muscles. It can be painful at first but it will help the cramp subside. You also need to drink a fluid that contains electrolytes as soon as possible. You also need to drink water and you can apply ice to the effected area. If you plan to resume the sports activity or work out make sure you are stretch out and hydrated.