To expand on Ches' reply, you can read what Spasm's are here :
http://www.apparelyz...spasticity.html
These muscle spasm's, or Spasticity, is an involuntary contraction of the muscle, which is triggered by a sensory stimulus, ie, "poking the leg with a pen".
In my case, they could be triggered by just the wind blowing against my legs, but that is an extreme case.
Spasticity, if it is causing a problem, can be managed by oral drugs such as Baclofen.
Sometimes, if the spasticity isn't having too much of a negative impact on a person's quality of life, it can be left, as the muscle contractions can help prevent muscle wastage (Atrophy), which in the long term can help prevent pressure sores.
Muscle spasm's vary greatly, and should be assessed on an individual basis.
Hope that helps.
Simon