The Messenger of Allah ﷺ drew back the curtain while the people were standing in rows behind Abu Bakr, and he said, "People, nothing remains of the glad tidings of prophethood except the righteous dream that a Muslim sees, or that is seen for him. I have been forbidden to recite the Quran while bowing or prostrating. As for bowing, glorify the Lord in it, and as for prostration, strive earnestly in supplication, for it is most fitting that your prayers be answered."
كشف رسول الله ﷺ الستارة، والناس صفوف خلف أبي بكر، فقال: أيها الناس! إنه لم يبق من مبشرات النبوة إلا الرؤيا الصالحة يراها المسلم، أو ترى له؛ ألا وإني نهيت أن أقرأ القرآن راكعا أو ساجدا، فأما الركوع فعظموا فيه الرب عز وجل، وأما السجود فاجتهدوا في الدعاء فقمن أن يستجاب لكم.
Muslim narrated it in the Book of Prayer (479) through several routes from Sufyan bin Uyayna, who said, Sulayman bin Suhaym informed me, from Ibrahim bin Abdullah bin Mabad, from his father, from Ibn Abbas, and he mentioned it.His saying, "I have been forbidden to recite the Quran while bowing or prostrating," refers to reciting and reading the Quran as such. As for reciting verses that contain supplications, there is no harm in reciting them for the purpose of supplication and seeking forgiveness.