My daughter coughs only for night v badly while sleeping. Y? Shes 7yrs

Many reasons. There are many different reasons for a cough that occurs at night. These could include asthma, nasal secretions, acid reflux just to name a few. If this has been a persistent problem for over 4 weeks or recurrent you should discuss with her physician.
Allergy or reflux. Nocturnal cough can be caused by acid reflux , post nasal drip, or allergies. You check with your child's doctor to find ou if any of these are a possible cuase for your child.