I don't think it was a stroke, sounds much more like a seizure.
With seizures, many times there is loss of control of many or all muscles because they are all trying to strech or contract at the same time. To you, this would appear as complete stiffening and even shaking slightly. Sometimes this results in BM, urination or vomiting. Plus as cats tend to hide what they are feeling, he will probably act fine until it happens again.
I would definately get you cat to the vet right away to find out what the cause of this is and what can be done.
Don't worry. Cats are very strong animals. With the right treatment, he's going to be ok.