From observing Scripture it seems that God's essence/nature "yesterday, today, and forever does not change". He is always good, faithful, just, loving, and so forth. However, His mind on certain matters seems influenced/altered by human prayer's. Or is it? Being an all-knowing God, He knew these prayers were going to be prayed a long time before the need for them arose. So, was God's mind really influenced/altered? Has God's mind, then, ever been altered?
I don't think so. God has always had a plan and what we think was a deviation from that plan was still His original plan. Can God's plans be thrwarted? I don't think so. He was before the plan and He is already at the end of the plan and He is presently overseeing the working of His plan in the meantime. There are no surprises with God, The God that stands outside of time and within it, because He made it and space too.
So, because there are no surprises with an all-knowing God - who are the situations of life and the prayers we pray in response good for? Us. I believe God is desiring to use every opportunity to draw everyone closer and closer to Him and to teach us what His word says about a given situation or circumstance. This drawing closer will be an endless process, because of the amazing, eternal facets of God we will perpetually discover as believers here and in heaven.
(Stemmed From Jeremiah 18:7-10)