Hi, so sorry to hear about your cough. Drink loads of warm water, try taking manuka honey, just leave it in the throat for as long as possible.
Also, for cough, if you sleep well you will get well. So perhaps check with your doc if any of the medication could be drowsy and help you sleep better at night. At 5 months, the baby will get heavier... By the time you are 7mths and above, if not taken care of well... when you cough or sneeze, you might leak urine. So you should get the cough under control. And I am not trying to frighten you. It happens quite a lot. Another thing that you could try is to do kegel /pelvic floor exercises. It helps strengthens the muscles down there, and helps prevents leaks as the baby gets heavier.