She could have something called bilious vomiting syndrome. Even though it's called bilious vomiting syndrome, it's not an actual vomiting that brings up the foam, it's a gagging cough. This happens in some dogs when they first wake up, the stomach is empty from not eating all night and there is a buildup of acid. You can try an experiment to see if this is what it is - try feeding your dog a small snack late at night or, if you wake up during the night, give her a cookie or two. If it stops happening when she eats something during the night, then all you have to do to control it is make sure she doesn't go longer than a couple of hours without something in her stomach to absorb the acid.
Thanks for the advice! Tried it last night and so far so good. I will continue with some treats before bed each night to make sure. Once again the advice is so appreciated!
You are more than welcome! :)