There's no way to know for sure; there's too many variables that can cause a headache to begin to guess. One way I know it's a withdrawal headache? I take whatever it is I'm withdrawing from (if its caffeine, for example, I drink a cup of coffee) and if the headache eases, I know it's the withdrawal. ;)
If you were drinking regular coffee, there could be another culprit that you might not even know... It's not unusual for staff to pour the decaf in the regular pot. ;) I've been guilty of that when I was a waitress. You could be having a caffeine withdrawal without even knowing it!