Thank you for your question.
I am Dr Saha, I shall try my best to help you.
This is likely cough syncope.
In some cases due to coughing or sneezing there is less venous blood return to heart & the cardiac output or blood coming from heart is diminished.
There is also an increase in vagus nerve tone.
All these effects causes less blood supply to brain producing syncope.
However, it is unusual to remain in such condition for 8 hours.
I would suggest to take an examination by doctor.
You may need a few tests to rule out any neurological or cardiac problem.
I hope this information helps.
If there’s anything else I can do, please let me know.
If you are satisfied, please rate my answer as good or excellent.