It is narrated from Hazrat Abu Dharr (may Allah be pleased with him) that the Noble Prophet (peace and blessings be upon him) said: Allah Almighty continuously pays attention to His servant during prayer as long as he does not look to the right or left, but when he turns his face away, Allah also turns His face away.
Hadith Referenceمسند احمد / مسند الأنصار رضي الله عنهم / 21508
Hadith Gradingحکم دارالسلام:صحيح لغيره، وهذا إسناد محتمل للتحسين