Hi Meeks!
I DO know what you're talking about. After my bout with pneumonia I had hiccups too. It was from the intense coughing. Our diaphram muscles work together with our intercostal muscles (rib cage). If the two are out of sync, we get hiccups. That's why holding our breath for as long as you can, will stop hiccups. It resets the muscles to work together.
When we're coughing constantly and really hard, it upsets the "rythm".
Annoying isn't it!!!