I had terrible headaches during the first couple months of getting sober. Not a lot, but every so often. Not sure why. I attributed them to quitting. I was also drinking a lot of caffeine.
Quite frankly, I was stressed out in those early months. Could have been stress headaches.
All I know is they went away once I stayed sober.