We have indeed seen you turning your face about in the heaven; now We will surely turn you to a direction (qibla) that will satisfy you. Turn your face toward the sacred mosque, and wherever you are turn your faces toward it.
[Muḥammad] ﷺ maintained [his] good manners when he kept his tongue silent from requesting the qibla he wished for in his heart. So he looked to the heaven because it is the path of Gabriel (عليه السلام) and God (سبحانه وتعالى) revealed, “We have indeed seen you turning your face about in the heaven,” that is, “We know the wish you have not expressed in prayer and We have already changed the qibla for your sake. This is an extraordinary thing that the Beloved does for the sake of the beloved.”
“We shall surely turn you to a direction that will satisfy you: Every servant strives in seeking My pleasure and I am seeking your pleasure, [Muḥammad]. Turn your face toward the sacred mosque, but do not attach your heart to the stones and leftover traces (āthār): devote your heart to Me. Let the qibla be the goal of your [outward] self and [let] the Real [be] the object of your heart's witnessing. Wherever you are (O believers) turn your faces toward it, but dedicate your hearts to Me and let your witnessing be only through Me.”
Those who have been given the scripture know that it is the truth from their Lord; God is not heedless of what they do.
“But it is not knowledge that will be a proof for them, nor is there any comfort for them in it or increase from it. God is not heedless of what you do in bringing fear to the enemies and providing hope for the friends (tahwīlan ʿalā l-aʿdāÌi wa taÌmīlan ʿalā l-awliyāÌi).”