Empty stomach cause gases and bloating
which is causing headache. So you need not to have any medicine, inspite of medicine do eat something in every 2 to 3 hours, avoid oily and spicey food so that there will be less chance of gas problem, and less will be headache.
Also be hydrated.
If this doesn't help you then consult us for homeopathic treatment.