Hakim b. Muhammad b, Muslim narrated from al Hasan b. ‘Ali b. Yaqtin from Yunus from Ibn Sinan from Hafs b. ‘Abd al-Hamid from Muhammad b. Muslim from Abu Ja’far Muhammad b. ‘Ali, peace be upon him, that one of his children was ill. He went to him and kissed him and said: ‘O my son, how do you find yourself?’ He replied: ‘I am suffering from a pain.’ He said: ‘When you complete your afternoon prayer (salat al-zuhr) say ten times “O Allah, O Allah, O Allah,”' for a distressed person (makrub) does not say it without the Lord, Blessed and Exalted, saying “Here I am, O my servant, what is your need?”’
From Abu ‘Abd Allah, peace be upon him, who said: ‘The prayer of a distressed person in the night is: “O Revealer of healing by night and day and Remover of illness by night and day, bring down on me Your Healing, a healing for all the illness in me.”’
Al-Qasim b. Bahram narrated from Muhammad b. ‘Isa from Abu Ishaq from al-Husayn b. al-Hasan al-Khurasani — and he was among the chosen ones — who said: I visited Abu ‘Abd Allah al-Sadiq, peace be upon him, in the days of Abu al-Dawaniq, with a group of my brothers who had performed the Hajj. He [al-Sadiq] was asked about the prayer of the distressed. He replied: 'The prayer of the distressed is when one has completed the night prayer (salat al-layl). Put your hand on the place on which you perform the prostration and say: “In the Name of Allah, in the Name of Allah, Muhammad is the Messenger of Allah, ‘Ali is the Imam of Allah on His earth, over all His servants. Heal me, O Healer. There is no healing but yours. A healing which does not leave out any illness from among every disease and illness.”’ Al-Khurasani said: I do not know whether he said to repeat it three times or seven times.
From him, that he said: “The prayer of the distressed and anxious, those at their wits’ end, and those afflicted with trials:
There is no god but Thou. Glory be to Thee. I have been one of the oppressors (al-zalimin) (21:87).
It should be said on Thursday night when one has completed his obligatory evening prayer.” He said: “I learnt it from Abu Ja’far al-Baqir, peace be upon him, who said he took it from ‘Ali b. al-Husayn from al-Husayn b. ‘Ali, who said he took it from Amir al-Mu’minin, who took it from the Messenger of Allah, who learnt it from Jibra’il who learnt it from Allah, the Mighty and Sublime.”