Abdullah bin Abbas reported,

He saw Abdullah bin Harith praying with his hair tied in a knot behind his head, so he stood up and began to undo it. When Abdullah finished his prayer, he turned to Ibn Abbas and said, "What business do you have with my head?"Ibn Abbas replied, "I heard the Messenger of Allah ﷺ say, 'The likeness of one who prays in this state is like that of someone praying with his hands tied behind his back.'"

Muslim 1101

Sahih

حدثنا عمرو بن سواد العامري أخبرنا عبد الله بن وهب أخبرنا عمرو بن الحارث أن بكيرا حدثه أن كريبا مولى ابن عباس حدثه

عن عبد الله بن عباس

أنه رأى عبد الله بن الحارث يصلي ورأسه معقوص من ورائه فقام فجعل يحله فلما انصرف أقبل إلى ابن عباس فقال ما لك ورأسي فقال إني سمعت رسول الله ﷺ يقول إنما مثل هذا مثل الذي يصلي وهو مكتوف

مسلم 1101صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Muslim
Book
Prayer
Chapter
Parts of the body for sujud and the prohibition of tucking the hair, garments, and tying the hair in prayer
Numbering
Darussalam 1101
Muslim 1101