I would definately take her to see a Dr., but my first reaction is that she is allergic to something in her room? I know that my 2 year old has mild dust allergies and would often cough at night. Sometimes coughing can lead to them vomiting. I added a humidifier to his room for moisture (I live in a dry dusty climate and that was adding to the problem), and I damp sponge his walls, crib and other furniture at least every other day now. I also removed stuffed animals from his room and his area rug (he only has hardwood floors now). I keep closet doors closed as clothing can also collect dust. I don't allow our cat into his room at all. Things are now much improved and I am told by his pedi this is common in small children, and chances are that he will eventually grow out of it.
Still, always best to talk to your Dr. This is my personal experience, but it may not be the same thing in your case.
All the best to you!
This is happening to me right about now! I have a 36 month daughter and she has been doing this for two days now not the first time happen before but to me is just flem that they are trying to get out! I also have a 6 yr old and I remember he would also do the same. My daughter throws up after coughing and then she sleeps all night. But wow she can be coughing for more then an hr . Take her to dr cough med should help her out a little .