A dog that coughs up white foam, usually first thing in the morning after waking from a night's sleep, probably has bilious vomiting syndrome, which is also called reflux gastritis. The white foam is bile from the dog's stomach. When the stomach is irritated from too much bile, the dog becomes nauseated and vomits.
Bilious vomiting syndrome tends to happen to dogs that have a history of digestive problems, such as attacks of acute pancreatitis or inflammatory bowel disease. When the stomach is empty, there is no cushion for the acid buildup that happens during a night's sleep or a long nap.
With bilious vomiting syndrome, the dog vomits up some white or yellow foamy bile and has no other symptoms. If the dog has other symptoms, it could have acute gastritis or even a gastric ulcer, and needs to see a vet.
Treatment involves avoiding having the dog go without food all night. Try feeding a small snack late at night.
According to veterinarian Holly Nash, if feeding a snack at night does not work, the dog may need to go to the vet for medication such as omeprazole or metoclopramide.
Omepraole is the active ingredient in human medications like Prilosec. Do not give human medication to dogs because human-sized doses are far too much for a dog to tolerate.