I'm only just reading this thread now and my initial thought has already been mentioned on here. I would guess that he blacked out from holding his breath from coughing. If he's fine now then I would just keep an eye on him for a while, but if he does it again then definitely a trip to the vets will be needed.

Let's hope it was just a one time incident!!!