Hormonal changes play a crucial role in the occurrence of headaches in women. Estrogen and progesterone influence the brain's pain perception mechanisms. A sudden drop in estrogen levels, which often occurs just before menstruation, can trigger headaches. Conversely, steady estrogen levels, such as those during pregnancy, can sometimes reduce headache frequency.