1 Spasms may affect many different types of muscles in the body, leading to many different symptoms and presentations. 2  Spasms of skeletal muscles are most common and are often due to dehydration and electrolyte abnormalities. 3  The spasm occurs abruptly, is painful, and is usually short-lived. The spasm occurs abruptly, is painful, and is usually short-lived. 2  It may be relieved by gently stretching the muscle. 3  If muscle spasms are especially painful, if they do not resolve or if they recur, medical care should be accessed to look for possible underlying causes.