I'll offer a different perspective as to not that I wish to limit prayer to changing others but that it is often how we respond to such a toxic environment that can be a great influence. Joseph was accused of trying to sleep with Potiphar's
wife and thrown into prison. But notice how Joseph responded.
But while Joseph was there in the prison, 21 the Lord was with him; he showed him kindness and granted him favor in the eyes of the prison warden. 22 So the warden put Joseph in charge of all those held in the prison, and he was made responsible for all that was done there. 23 The warden paid no attention to anything under Joseph’s care, because the Lord was with Joseph and gave him success in whatever he did.
Joseph kept on doing what was right in the Lord's eyes and even in prison he prospered.