During vigorous exercise, the muscles in our body need a continuous supply of energy.  To meet this requirement, the muscles start respiring anaerobically to produce lactic acid, water and ATP.  This causes muscle cramps in our body.  Hot baths and massages give relief to the pain due to these cramps. 
1 5 1
When we exercise vigorously the muscles respire anaerobically which lead to lactic acid formation, and causes pain. Taking rest for a short while reliefs us from the pain as the lactic acid formed disintegrates as the muscles respire aerobically