I've found that when I start coughing at night if I incline my head it drastically reduces the coughing.
I also use a humidifier in my bedroom at night especially on cold winter nights when the air is dry due to heating the air.
Allergens could also be causing your coughing fit at night so try taking some over the counter allergy medicine and even purify the air in your home and bedroom.
Also a warm glass of honey and tea seems to help with my coughs as well.