I'm understanding your question as not "Is it all in his head?," but rather "Could my friend's migraines be triggered by the mental stress from the anticipation of going to school or from the school experience itself while he's there?"
Now this is my opinion only obviously since I'm not his neurologist, just a fellow sufferer. I would say that the school environment could be a trigger for him that exacerbates your friend's condition. I can relate because I work in a stressful environment myself, and as a result of trying to cope for four years now, I have developed daily chronic headaches that sometimes are migraines due in part I believe to my current work situation.
Hopefully your friend is seeking treatment from a neurologist who specializes in migraine disease. I feel for him because I have the same problem, only mine is work-related. One other suggestion is that he consult his dentist to see if he is grinding his teeth at night or during the day (when concentrating, during stressful situations). I found I was grinding my teeth at night and my dentist made me a night guard to wear with a piece called an NTI-TSS device on it. (Hasn't solved my problem, except for saving my teeth, but has helped other people I know who have migraine disease.)
Hope this helps and I will pray for your friend that soon he won't have what should be the best time of his life interrupted by migraines. God bless, Susan