Always rule out physical causes first before jumping to spiritual ones. Stress and dehydration are two of the most common causes of head aches.
As for rituals. If I am tired to begin with and my mind doesn' want to be quiet, then trying to focus and visualise intensely for a long period of time can become quite strenuous, tiring, and can sometimes leave me with some tension around the head area.
It is my opinion you cannot cause physical harm to yourself by performing a ritual incorrectly....unless of course you knock over candles with the flourish of a hand, or trip up holding a dagger!