My daughter is in eighth grade (pre AP classes), ADD/ADHD (Adderall XR) and absolutely LOVES to read. She has had a problem with headaches that lead to nausea and finally vomiting since she was in first grade. Some of these incidents happened at school but more often than not, she came home with the headache and then the nausea would hit and finally she would throw up. Afterwords, she felt immediately better and then ate like there was no tomorrow. After several trips to the doctors to rule out virus, bacterial infections and other potential problems, we started to ask her about what she did during the school day (physical activity, what she had for lunch, bathroom habits, water intake, ect.). We finally figured out that her hydration level was the trigger. So for the next several years, we would have to remind her to drink plenty of water throughout the day and even asked her teachers to give a gentle reminder as well.
Now days my daughter is pretty good about staying hydrated throughout the day by stopping at the water fountain between classes (no more reminders from Mom!). But on those days that she forgets and she has that first twinge of a headach, she will grab her water bottle that she keeps filled and in her backpack (they don't use lockers at her school). If she catches it early enough, she can shut down the headache before it gets any worse.