It can be scarry. I luckily was at Jeter's vet appointment when he first started to do this and I about fainted with worry, I thought he was choking on something and was going to die

My vet told me what it was he was doing and he said sometimes if you massage their neck gently, it will stop an episode. Jeter does this when he is excited, scared, when I put him in the tub, and after drinking, and once he woke up having a fit.