He said, I prayed beside Ubayy and placed my hands between my knees, but he forbade me from doing that. I did it again, so he said, "Do not do this, for we used to do it but were forbidden from it and were commanded to place our hands on our knees."
حدثنا حفص بن عمر، حدثنا شعبة، عن أبي يعفور،
قال صليت إلى جنب أبي فجعلت يدى بين ركبتى فنهاني عن ذلك، فعدت فقال لا تصنع هذا فإنا كنا نفعله فنهينا عن ذلك وأمرنا أن نضع أيدينا على الركب.
Bukhari narrated it in the Book of Adhan, chapter on placing the palms on the knees during ruku, hadith 790, from the hadith of Shubah, and Muslim narrated it in the Book of Mosques, chapter on the recommendation to place the hands on the knees during ruku and the abrogation of tatbiq, hadith 535, from the hadith of Abu Yafur, with the same wording.