Air travel messes with your body. Stress just getting to the airport and once there you have to deal with being treated like scum by the staff. In the air your life is in the hands of whoever would do the job cheapest. In the cabin you're in a small space where you can't move, and so the lymphatic system (which is pumped by muscle movement) doesn't work properly. All the little pressure vessels in your body expand and press on other bits of your anatomy, in the skull that causes headaches. You're in close proximity to eight other people who are all shedding their diseases onto you.
No wonder you feel awful.
Aisle seats and lots of fluids is my unscientific recommendation. More space, better air circulation and easier to move about. Or just avoid non-solo flying whenever possible.