A blessing for a headache? Perhaps, “Blessed are you, Lord our God, who gave me a headache”? Just kidding.
Seriously, I assume you mean what blessing a person can give someone else who has a headache, hoping it will help. There are at least two blessings you can say.
One is to say directly to the person, “May you have a quick and complete recovery”. In Hebrew this is said as “Refuah Sheleimah” and is appropriate to say to any person who is not well.
The other thing that can be done is to say the blessing of “Heal us” (“Refa’unu” in Hebrew) as part of the silent standing prayer (“Amida”) that is said three times daily on a weekday. You can have the sick person in mind while saying the blessing in prayer, or mention the person’s name in Hebrew if you know it.
And you can also offer the person some Tylenol and water in addition to your blessings. Be well.