I don't why but that happens to me often as well! I'm talking a total stab in the dark but it probably has something to do with your breathing being interrupted with coughing and then your diaphragm getting off track. Probably not much help but at least you know you aren't alone!
Hiccups are still a medical mystery. Scientists still don't know for sure what causes them. There are a couple of theories. One is that your CO2 level gets out of whack. Try taking slow, deep breaths with a long exhalation after coughing (and in between coughs, if possible) and see if it helps.