Sometimes I get a headache and I cannot pray except by means of gestures. I do not prostrate because of this headache with which I cannot prostrate. What is the ruling on this? May Allah reward you with the best of rewards on my behalf.
Allah, may He be glorified and exalted, says (interpretation of the meaning):
“So keep your duty to Allaah and fear Him as much as you can”
“Allaah burdens not a person beyond his scope”
So if a person has a pain in his head which makes it difficult for him to prostrate on the ground and he will be harmed by that, there is nothing wrong with him making gestures, and his gesture for prostration should be deeper than his gesture for bowing. There is nothing wrong with him bowing and prostrating in gestures, but his prostration should be deeper than his bowing, if it is too difficult for him to prostrate on the ground because of pain in his head or other sicknesses which prevent him from prostrating.
Shaykh ‘Abd al-‘Azeez ibn Baaz (may Allah have mercy on him)