Marilyn,
Headache is on the hypoglycemia (low blood sugar) symptom list. Excess carb consumption causes excessive insulin release. If the carbs eaten are simple starches or sugars, they will digest in less than 2 hours. The insulin takes 2 hours to dissipate. High insulin results in low blood sugar, which can kick in as fast as 20 minutes after say, a glass of juice.
In the meantime, the insulin has packed the blood sugar into muscles when active, or fat when inactive, and the low blood sugar is starving the brain, no matter how many calories were eaten. The resulting hunger drives one to eat excess calories and gain weight.
Resisting the hunger results in headaches, misery and the eventual development of type II diabetes as your body becomes insulin resistant to protect your brain from repeated low blood sugar episodes. In other words, people can unwittingly cause their own type II diabetes.
I would say correcting your diet has helped you, no doubt.
Sorry about high-jacking your thread, Monty.