I don’t know about autism, but I had some persistent headaches for years until I gave up soda, which has high fructose corn syrup. The headaches stopped a couple days later and I have not had one since.
I am allergic to corn in all forms, confirmed by allergy testing. Corn gives me a headache.