The Prophet ﷺ used to take a midday rest. So I prayed, then came and sat down beside him.He said, "Abu Hurayrah, do you have a stomach ache?"I replied, "No, Messenger of Allah."He said, "Pray, for in prayer there is healing."
حدثنا موسى بن داود قال حدثنا ذواد بن علبة عن ليث عن مجاهد
كان النبي ﷺ يهجر قال فصليت ثم جئت فجلست إليه فقال يا أبا هريرة اشكمت درد قال قلت لا يا رسول الله قال صل فإن في الصلاة شفاء
No references are available.
Its isnad is daif, containing Dhawwad bin Alba and Layth bin Abu Salim, but their weakness is slight. The hadith is found in Ibn Majah, 2/1144, no. 3458, with the wording, "I complained of a toothache," saying "yes" instead of "no." The hadith is sahih, and it has already come shortly before.