Sayyiduna Abdullah bin Abbas (may Allah be pleased with them both) narrates: The Prophet Muhammad (peace be upon him) used to glance to the right and to the left during prayer, but he would not turn his neck to look behind his back.
Hadith Referenceصحیح ابن حبان / كتاب الصلاة / 2288
Hadith Gradingفضيلة الشيخ الإمام محمد ناصر الدين الألبانيصحيح - «المشكاة» (998).فضيلة الشيخ العلّامة شُعيب الأرناؤوطإسناده صحيح على شرطهما.