The thing that makes diagnosis difficult is: (1) the 4-5 hr. delay in onset post-dive, (2) any number of things can cause dive-related headaches, and (3) the fact that you are still a relatively new diver who has experienced these post-dive headaches a limited number of times (this speaks to reproducibility of the phenomenon and would mean something different coming from an experienced diver who was diving pain-free for years and then all of a sudden started getting such headaches).
You really haven't given that much detail about your headaches other than the onset of the pain. If you see a physician about this, he/she will ask many detailed questions about your headache: precise location of the pain, any associated symptoms (nausea, vomiting, dizziness, vision disturbances, lightheadedness, light-sensitivity,other neurological issues), duration of the pain, do you get this kind of headache when you aren't diving, were you "sick" at the time, what were your dive profiles like (aggressive, conservative), how fast did you ascend, what was the temperature of the water, were you wearing a tightly-fitting hood, were you biting down hard on the mouthpiece, is it possible you were dehydrated, quality/character of the pain (sharp, dull, pulsating, transient), what makes it better (aspirin, Tylenol, ibuprofen, lying down, darkness), what makes it worse (certain body positions, bright light, exercise), any history of dental disease/TMJ disorder, how physically fit are you, any history of allergies/sinus problems, did you have a sinus infection at the time, any past history of headache/hypertension/cardiovascular disease, any of those issues run in your family, etc. The list of questions is very long, and it's impractical for someone to diagnose something like this over the Internet.
Headaches can sometimes be a sign of some other insidious medical condition.
If you are particularly troubled by these headaches, then see a doctor.