The Prophet (peace be upon him) says, “When any one of you prays, he must not spit in front of him, for Allah is in front of him when he is engaged in prayer. But he should do so on his left or down his feet.” [agreed upon]
Sheikh Ibn Uthaymeen comments, ” This hadith has decisive proof that Allah is in the front of the person who prays. As for spitting to one’s right side, it’s not preferable because an angel is reported to be on one’s right side; this leaves out the left side or under the feet.
We can extract from this hadith that Allah is in front of the person who prays; however, we must know that Who said so is the same One who declared Himself to be in the heavens. There is no contradiction as we can reconcile between these two texts from three aspects:
1- The Islamic law contains both reports and it’s impossible for it to contain any contradictions.
2- Logically, a thing could be up in the sky while being right in front of you simultaneously; consider the sun which lies in front of you but higher than you. Therefore, since such fact is applicable for created objects, it’s obviously and undoubtedly applicable for the Creator Himself.
3- Even if we suppose this is not applicable for created objects, it wouldn’t be the same case for Allah; who there is nothing similar or comparable to Him.”
Translated by: Abdullah Ibrahim Omran al-Misri.