A muscle can either tighten or loosen. The brain gives the orders, the spinal cord executes them. The default stance of the human body is that of a fetus and this is what will happen if you completely remove the brain.
In MS, information about the current length of a muscle do not reach the brain, hence information from the brain that says "It 's ok, the muscle is not that long" does not reach the spinal cord. The latter, "afraid" that the muscle is about to be harmed, sends an excitatory signal, ordering it to tighten.
Magnesium helps by making the muscles less tight, thus somehow decreasing the "voice" saying "I am about to be cut! Do something!". Definitely, spasticity is not a deficiency, but can be helped just a little.
Baclofen simulates excitation by the signals that should come from the brain, asking the spinal cord to relax the muscle. But that is a veeeeeeeery stupid drug: It will relax all muscles, all the time. Not just when you need to relax them. It is a fantastic pain killer, but it is more than useless in aiding you walk.
When I was first diagnosed, I was given the impression that we may not be able to cure MS, but we can manage its symptoms. For some reason, I believe that we can't do either. All these years, I haven't taken any drug that worked. I am in serious doubt about applied science. I consider it nothing more than some kids playing the researcher. Research that does not help is useless and should be avoided. I wonder how many drugs would make it if the price were proportional to the therapeutic result, after it happens...
Shortest joke: "We may not be able to cure MS but we can manage its symptoms."