Muhammad b. Ja’far al-Bursi narrated from Muhammad b. Yahya al-Armani from Muhammad b. Sinan al-Sinani from Yunus b. Zabyan from al-Mufaddal b. ’Umar from Abu ’Abd Allah al-Sadiq, peace be upon him, who said: This is an invocation revealed by Jibra’il, peace be upon him, to the Prophet, peace be upon him, when the latter was suffering from a headache (al-suda’). Jibra’il said: “O Muhammad, take refuge from your headache with this invocation, Allah will relieve you of it.” Then he said: “O Muhammad, whosoever takes refuge with this invocation seven times for any pain that afflicts him, Allah will heal him if He wills.
Pass your hand over the painful area and say: ‘In the Name of Allah, our Lord, Whose mention is glorified in the heavens, our Lord Whose command in the heavens and the earth is executed and performed. Just as Your command is executed in the heavens, bestow Your Mercy on earth, and forgive us our sins and our faults. O Lord of the good, the pure ones, bestow a cure, and mercy from Your Mercy, on so-and-so, son of so-and-so’, and mention his name.”
Another invocation for headache: ‘O One Who diminishes the great and magnifies the small; O Remover of uncleanliness from Muhammad and his family, and their complete Purifier. Bless Muhammad and his family. Remove what is in me of headache and migraine (al-shaqiqa).’