I have a bad cough and can't go to sleep. What can I do?

Vicks VapoRub. On the soles of your feet, as well as a dab under your nose. Be sure to wear socks. I don't know why, but this really works.
See doctor.. A cough cannot be treated unless a diagnosis is made first. Possible etiologies of your cough include bronchospasm from any cause, post-nasal drip, gerd or a combination of factors. These all have entirely different treatments so see your doctor so a diagnosis can be made and treatment rendered.