Re: Back leg spasms
I had a 9 year old GSD that would involuntarily kick out her hind legs, not really bad, but kind of like after a male dog pees he'll kick out his legs and scratch the grass. She wasn't in pain when this happened, and it went away after only a few kicks. So I'm not sure if it is similar to what your dog is experiencing.
Unfortunately for us, that was the first symptoms of DM, which eventually took her to the bridge at 11 1/2. Hopefully that is not the case with your dog.
To show the vet what is happening, I videotaped her when she was doing it, because it was random and could not be reproduced. That way the vet could see what it was without stressing the dog.