It happens to people with ALS (uncontrollable leg shaking) and it goes away after a few seconds (or minutes).
It's called Clonus and, it happens when there is UMN (Upper Motor Neuron) damage.
It's not life threatening but it's unpleasant while it lasts.
It happens to myself and it's triggered when I'm sitting at the table and I raise the ankle a little bit, or when I experiencing a little fear or phobia to fall.
I don't know if there is medication for it, to keep it under control but, you may want to ask your ALS Clinic to see what they recommend you if Clonus has become very troublesome to your PALS.
HTH