Previously, considering unanswered prayers, I wondered: Did God actually consider Abraham's request when he rescued Lot and his family? Or was Abraham simply right from the beginning, "Far be it from You to slay the righteous with the wicked, that the righteous should be as the wicked, far be it from you! Shall not the Judge of all the earth do right?" God's will was always to stop evil and save the righteous; Abraham did not introduce that thought to God. (It may be that one reason for stopping the evil was to save the righteous.) So it may be more that Abraham knew of God's justice, and God's justice led Abraham's prayer.
At first glance Abraham's prayer appears unanswered -- Sodom was destroyed. It seems like a technicality that Abraham never asked for Sodom to be spared unconditionally, that he only bargained down to 10 innocents in the city, and there were not 10. But it is more to the point that the innocent were, after all, spared. That was Abraham's original and persistent concern. If Abraham had simply prayed "Your will be done," wouldn't the result have been the same?
It is easy for me to look at some of my own unanswered prayers, to focus on things that I wished differently. But in the end, wasn't the outcome good? When I pray, "Your will be done," doesn't God's will include compassion for the struggling, and healing for the sick, and reconciliation for the estranged, and peace for the troubled? And more. I think that might give me comfort and consolation even if the details of a prayer are not granted, that God's will still encompasses all the good that I wished and longed for. Even if my own plans do not work out, God's plans continue.