To stop uncontrollable coughing you should use a humidifier in your home and when sleeping you should prop your head up on a pillow at least 3 to 6 inches which helps keep the mucus from getting up into your throat.
Drink plenty of water to keep your throat moist which also helps prevent coughing and uncontrollable coughing.
Another thing you should do is to use some air purifiers in your home to help get rid of irritants in the air which could be causing your uncontrollable coughing.
Taking a steamy hot shower and breathing in the steam can also help with the uncontrollable coughing and if it doesn't then the uncontrollable coughing can be caused by other health issues such as COPD or GERD.
So it would be a good idea to get checked out by a doctor to be sure it's nothing serious since coughing uncontrollably can be caused by something more serious so it should be checked out just to make sure nothing more serious is going on.
I would also recommend drinking some hot tea with honey as the tea will hydrate you and keep your throat moist while the honey in the tea will help to soothe your throat.