What may not be done during Prayer and what is permitted - Section 2 Mishkat al-Masabih 996
Arabic hadith text
وَعَنْ أَنَسٍ أَنَّ النَّبِيَّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ قَالَ: «يَا أَنَسُ اجْعَلْ بَصَرَكَ حَيْثُ تَسْجُدُ» . رَوَاهُ الْبَيْهَقِيُّ فِي سُنَنِهِ الْكَبِيرِ مِنْ طَرِيق الْحسن عَن أنس يرفعهُ
Translation
Anas told that the Prophet said, “Keep looking in the direction towards which you prostrate yourself, Anas.” Baihaqi transmitted it in [Kitab] as-sunan al-kabir through al-Hasan from Anas, tracing it back to the Prophet.