What is meant by saying “Allah is in heaven”
Question

                I have heard someone deny that Allah, may He be exalted, is in heaven. He says: The heaven (or the sky) is going to cease to exist; exalted be Allah above occupying space in it. And the Prophet (blessings and peace of Allah be upon him) said: “The heaven creaked, and no wonder it creaked, for there is no spot in it but there is an angel there, standing or bowing or prostrating.” So exalted be Allah above occupying space among the angels.
Praise be to Allah.These words are a correct statement made with a bad or twisted intention. It is true that Allah does not occupy space in heaven, nor does He – may He be exalted – occupy space among the angels. What is wrong here is the conclusion he wants to reach, which is the denial that Allah, may He be exalted, is above His creation, and giving people the false impression that if Ahl as-Sunnah wa’l-Jamaa‘ah say that Allah, may He be exalted, is “in heaven [fi’s-samaa’]”, what is meant is that the heaven contains Him or encompasses Him. No one of Ahl as-Sunnah says such a thing.
Ahl as-Sunnah do not say that Allah, may He be exalted, is “in heaven [fi’s-samaa’]” on the basis of some line of poetry or eloquent literary text; rather they say that, and believe it, on the basis of what Allah, may He be exalted, says about Himself, and what the Messenger (blessings and peace of Allah be upon him) said.
For more information on some of the evidence for Allah, may He be exalted, being above His creation, please see the answers to questions no. 992 and 124469.
To refute the specious argument mentioned in the question, we say: The word samaa’ (heaven, sky) has two meanings: (i) being high or exalted and (ii) the well-known physical entity which is the “the heaven raised high” (cf. 52:5). When Ahl as-Sunnah say that Allah is in heaven, what is meant is by heaven here is being high, exalted, above all things [and not in a physical location].
However, when the word samaa’ is used to refer to the physical firmament, then what is meant by “in” (fi) is “above” (‘ala).
Al-Haafiz Ibn ‘Abd al-Barr (may Allah have mercy on him) said:
The words (interpretation of the meaning) “Do you feel secure that He who [is] in the heaven would not cause the earth to swallow you”[ al-Mulk 67:16] mean: He Who is above the heavens, that is, above the Throne.
The word fi (“in”) may mean ‘ala (above). In the verse in which Allah, may He be exalted, says (interpretation of the meaning): “So travel freely, [O disbelievers], in [fi] the land [during] four months” [at-Tawbah 9:2], the word fi (lit. “in”) means on (‘ala) the land. End quote.
At-Tamheed (7/130).
Shaykh Muhammad ibn Saalih al-‘Uthaymeen (may Allah have mercy on him) said:
What is meant by Allah being in heaven [fi’s-samaa’] is that He is above the heavens, so the word fi (lit. in) in this instance means ‘ala (above), as is seen in the verse in which He, may He be exalted, says (interpretation of the meaning): “Say, Travel in (fi) the land” [al-An‘aam 6:11]. Here fi (in) means ‘ala (on).
It may be that fi (in) refers to time or place; in this case the word samaa’ (translated above as heaven) refers to being high or exalted. In that case, what is meant is that Allah is on high.
The meaning of time or place is not appropriate in the phrase fi’s-samaa’ if what is meant by samaa’ is the physical entity or firmament, because that may give the impression that the sky or heaven (as-samaa’) is encompassing Allah, and this meaning is wrong, for Allah is too great to be encompassed by anything that He has created. End quote.
Majmoo‘ Fataawa ash-Shaykh al-‘Uthaymeen (4/283)
Shaykh al-Islam Ibn Taymiyah (may Allah have mercy on him) said:
When the early generations (salaf), the leading scholars (imams) and all the Sunni scholars say that Allah is “above the Throne” or that He is “in heaven [fi’s-samaa’], above all things”, they are not saying that there is something that encompasses Him or contains Him, or that there is some place where He is, , glorified and exalted be He far above that. Rather He is above all things, and He has no need of all things; rather all things are in need of Him. He is far above all things, and He is the One Who is holding the Throne and the bearers of the Throne, by His might and power. Every created being is in need of Him, and He has no need of the Throne or of any created being.
With regard to what we see in the Qur’an and Sunnah of the words “Do you feel secure that He who [is] in the heaven would not …”[ al-Mulk 67:16], and the like, some may understand from it that the word samaa’ (heaven) refers to the lofty created things, the Throne and everything beneath it, so they say that the phrase “in  heaven (fi’s-samaa’)” means “above the heaven (‘ala’as-samaa’)”, similar to the verse (interpretation of the meaning), “Say, Travel in (fi) the land” [al-An‘aam 6:11] meaning travel on the land.
There is no need for all this discussion; rather the word samaa’ refers to anything that is high or lofty, and it does not refer to any specific physical entity. The phrase fi’s-samaa’ [translated as “in heaven”] refers to being up or above, as opposed to being down or beneath.
 So Allah is the Exalted, the Most High, and His is all highness and exaltedness; He is above the Throne, and there is none but Him, the Exalted, the Most High, glorified and exalted be He. End quote.
Majmoo‘ al-Fataawa (16/100-101).
And Allah knows best.