That does sound like spasticity. Lots can go "wrong" with your muscles. The problem is that the signals from the brain aren't getting through to the muscles properly...or in some cases, not at all. So the poor muscle is doing it's best to do it's job, but just can't always do it. Think about an electrical wire with a "short" in it somewhere. It sparks, sputters, maybe continues to try to keep the lamp lit..but the lamp flickers, maybe goes out for awhile, but then when you jiggle the lamp or cord, the lamp comes on again...
That's sort of what is happening with your muscles.
I've always understood baclofen (and some other such drugs) need to be taken regularly, in order to build up a certain level in your bloodstream to keep that under control. I know that a couple of folks here..and elsewhere..suggest it can be taken "as needed"...but from what I've read (and here is a link to one site), it works best if taken regularly:
If you do take it though, keep in touch with your doctor. The dosage does need adjusting from time to time, and too much of it can cause worse problems (primarily very weak muscles, not good if we're talking leg muscles here!).
Anyway. That's all I know about it. I was taking it for awhile...years ago...then fell, broke my leg (I think I've told this story..forgive me)..and the doctor was pretty sure it was because of the baclofen. So I stopped taking it, and just deal with the spasticity. I found that some spasticity was good, particularly when I was walking with forearm crutches, as it kept me more upright than with reduced spasticity. But it may work differently for you.
...I am not a doctor, nor health professional, and don't pretend to be one, here.....