Seizure and needs to be seen by a vet. I had a dog that did this and it turned out he had cancer.
I would walk him and he would run around having fun then just fall stiff as if he was dead....it freaked me out to see him come out of it and go on as if nothing. I took him to a specialist and cancer was confirmed. He is at the doggy rainbow now but I gave him the best care possible.