I asked the Prophet ﷺ about turning one's head during prayer, and he said, "It is something Satan snatches away from a servant's prayer."
حدثنا معاوية بن عمرو قال حدثنا زائدة عن أشعث بن أبي الشعثاء عن مسروق
سألت النبي ﷺ عن التلفت في الصلاة فقال اختلاس يختلسه الشيطان من صلاة العبد
Its isnad is sahih. Bukhari narrated it, 2/234, no. 751, in the chapter on adhan, and Abu Dawud, 1/239, no. 910, in the chapter on prayer, and Tirmidhi, 2/484, no. 590, and he said, hasan gharib. And Nasai, 3/8, no. 1196, in the chapter on prayer. And Hakim, 1/237, and Dhahabi agreed with him.