It was narrated that Ibn 'Abbas said:
"The Messenger of Allah (ﷺ) used to turn to his right and left when praying, but he did not twist his neck to look behind him."