I've had the same problem as you - ear blocked, and then a headache that made me feel like pounding my head hard on the wall was the only way to make it better. When I landed, it took nearly 30 mins for the pain to subside and the ear to unblock, but only after I threw up.
Found out later that it was sinus problem that affected my in-ear balance. All my doc gave me were sinus and allergy meds, and now I don't have that problem anymore.