Did you have your ovaries removed, or no? If your headaches were related to the part of your cycle where your estrogen levels drop, and your ovaries are gone, your head is still adapting to the drop in hormone levels that will even out in a few months. Ow, that's a long time to wait.
If you still have your ovaries, I have no suggestion about what might be causing your headaches...
Have you tried accupressure to ease the pain? There are a couple of pressure points that make different headaches abate, and it's cheap and easy to do whenever you feel one coming on.
The treatment of pain is an interesting subject -- it is far more important to stop the pain from getting bad than it is to wait until it's 'worth treating' because pain ends up creating a shadow of itself that is sometimes worse than whatever the initial pain was about...
Headaches are often caused by jaw clenching at night... are they worse in the morning when you wake? Whole body stress is often a result of invasive surgery and fear (cancer anyone?), so the stress of the operation may not have been released yet...
Alternatively, it may be nothing more than a lack of oxygen... abdominal surgery is a big deal for a body, and the pain of fully breathing initially following the operation may result in habitual shallow breathing that causes headaches.
Drinking enough water? Recently give up caffeine? Dehydration and caffeine withdrawl are both headache triggers that may have nothing at all to do with the surgery (or your cycle)...
Whatever it is, I hope it goes away. Headaches are so annoying when they last and last, they just colour ever part of life with genuine misery.