Muhammad ibn Saalim narrates that Thaabit al-Bunaani said to him, “O Muhammad, when you feel pain then place your hand where you feel the pain and say:
“In the name of Allah, I seek refuge with Allah’s Might and Ability from the evil of what I find from this pain of mine”
Then raise your hand, then repeat this an odd number of times, for verily Anas ibn Maalik narrated to me that the messenger of Allah (may Allah’s peace and blessings be upon him) narrated it to him.
(Narrated by al-Tirmizi in his Sunan in the chapter regarding incantation when one feels pain)
حدثنا محمد بن سالم حدثنا ثابت البناني قال : قال لي يا محمد إذا اشتكيت فضع يدك حيث تشتكي وقل:
بِسْمِ اللهِ أَعُوْذُ بِعِزَّةِ اللهِ وَ قُدْرَتِهِ مِنْ شَرِّ مَا أَجِدُ مِنْ وَجَعِيْ هٰذَا
ثم ارفع يدك ثم أعد ذلك وترا فإن أنس بن مالك حدثني أن رسول الله صلى الله عليه و سلم حدثه بذلك
(رواه الترمذي في سننه في باب في الرقية إذا اشتكى)