2 Chronicles 6:39
Then hear thou from the heavens, even from thy dwelling place, their prayer and their supplications, and maintain their cause, and forgive thy people which have sinned against thee. Then hear thou from the heavens, even from thy dwelling place, their prayer and their supplications, and maintain their cause, and forgive thy people which have sinned against thee.
The verse belongs to Solomon's prayer at the dedication of the temple after it was built, offered aloud and kneeling on a brazen scaffold in the presence and hearing of all assembled Israel. He stood with hands lifted toward heaven in earnest solemn prayer while the congregation bowed with faces to the ground. The words of that prayer are recorded in the Bible. God answered the prayer by sending fire from heaven to consume the burnt offering and by appearing to Solomon by night to say He had heard his prayer.
It concerns a time when Israel sins, since no one is without sin, and God in anger delivers them to enemies so they are carried captive to a land far off or near. If in the land of captivity they think again and turn and pray there confessing they have sinned and done amiss and dealt wickedly, and if they return to God with all their heart and with all their soul and pray toward their land given to their fathers and toward the chosen city and toward the house built for His name, then the condition for restoration is met.
Even when God's people have been carried into captivity because of sin, if they turn back to Him and pray, He will hear their prayer and supplications from heaven, from His dwelling place, uphold their cause, and forgive His people who have sinned against Him. God hears His people's prayers from His heavenly dwelling, answers them, and forgives them. He is not confined to the temple: He meets His people by His Spirit when they gather there, visits and encourages them wherever they are, and may be worshiped in every place.