Get Your Dog Care Questions Answered by Experts
I think what your experiencing is called "collapsing trachea." It is very common in small breed dogs. My maltese does it too. It usually occurs more frequently when they become excited, drink water quickly, bark, have an allergy episode, or have an upper respiratory infection.
We do not usually use medications to treat it unless it occurs multiple times a day.
Just like you, I try to get my dog to relax which works.
If it continues to happen, or if your dog gets other respiratory signs, he should see the vet. He might have a respiratory infection or another condition.
The collapsing trachea can be diagnosed with a physical exam, chest x rays, and a scope down into the area.
Here is a good explanation with pictures: