When I do have a headache, medication is usually a last resort. If painkillers had an instant effect, things would be different, but my headache reasoning is that myself half an hour in the future will have gotten over the headache or will have mentally accepted it and used it as an opportunity to build character.
Two headache treatments I do use are drinking water and eating food in case I've forgotten to do one or the other for too long. If that doesn't work, I sleep until the headache goes away.
I do in fact have a headache while writing this, and the funny thing is that if I had an upset stomach I would probably say I would rather have a headache. I'll have to remember to write something down when I next get queasy-- the grass is greener on the other side of the illness fence.