My dog just had the same symptoms and our vet is treating him
My dog whom I rescued last summer had 2 almost identical episodes in the past month. He woke up one morning and was headed to the back door . I heard a few hacking coughs and then some distressed barking. When I got to him, he was laying on his side with eyes fixed , breathing rapidly. I thought he was dying. I knelt beside him and talked softly and stroked his hair gently . The episode lasted 3-5 minutes before he was able to raise his head and then get up. About 3 days passed and he was in the kitchen. He started hacking as if he were trying to cough something up , then he ran to the other room and I heard the scared, distressed barking . When I got in there he was again laying on his side and paddling his feet as if he were swimming and I did the same thing . It lasted about the same amount of time. I thought he was having a stroke. I took him to the vet, he thought it could be heart related , did blood work and told me to watch him. About 3 days later , I was taking him for a walk and about halfway down the block he started the cough, dropped to his knees and then fell over on his side . I knelt down , again talked to him calmly and rubbed his back until he lifted his head and got up and 'shook it off'. The vet decided to put him on the KBR anti seizure medicine twice a day and since he did I have seen one more episode but he still does the cough. He has been on the medicine about 3-4 weeks now . I am still terribly worried about him but my vet is very good at listening and caring about my dogs. So I hope this well solve the problem. You aren't alone and it is very scary when it happens.