It is narrated from Sayyiduna Ibn Abbas (may Allah be pleased with them both) that the Messenger of Allah (peace and blessings be upon him) would glance to the right and the left during his prayer, but he would not turn his neck toward his back.
This is how al-Fadl bin Musa narrated it; others differed with him and narrated it with a broken (munqati') chain.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 2251