I asked the Messenger of Allah ﷺ about turning one's head during prayer, and he said, "It is something Satan snatches away from a servant's prayer."
سألت رسول الله ﷺ عن الالتفات في الصلاة فقال: هو اختلاس يختلسه الشيطان من صلاة العبد.
Bukhari narrated it in the Book of Adhan (751), from Musaddad, who said, Abu Ahwas told us, he said, Ashath bin Salim told us, from his father, from Masruq, from Ayesha, and he mentioned it.His saying "snatching" means "seizing quickly."