It is narrated from Sayyiduna Abdullah bin Abbas (may Allah be pleased with them both) that the Prophet (peace and blessings be upon him), while praying, would turn his attention to the right and left, and he would not twist his neck towards the back.
Al-Talaqani (may Allah have mercy on him) said that Thawr (may Allah have mercy on him) narrated to him from Ikrimah (may Allah have mercy on him): "The Messenger of Allah (peace and blessings be upon him)" (the text ends here).
Related hadith on this topic