Charles Spurgeon said, "When your will is God's will, you will have your will." Spurgeon understood that our will submits to God's will in prayer. Then, prayer says to God, "Your will be done, on earth as it is in heaven" (Matthew 6:10).
Prayer submits to the good, acceptable, and perfect will of God (Romans 12:2). Trying to manipulate God in prayer to have it our way is wrong. Seeking a formula in prayer to always get what we want becomes sin. It misses the mark concerning God's good will. You ask and do not receive, because you ask amiss, that you may spend it on your pleasures (James 4:3).
Prayer submits to the will of God, according to the Bible. Holy Scripture is God's revealed will. Now this is the confidence that we have in Him, that if we ask anything according to His will, he hears us. And if we know he hears us, whatever we ask, we know that we have the petitions that we have asked of Him (1 John 5:14-15).
Prayer seeks God's glory (1 Corinthians 10:31). He does all things to the praise of his glory (Ephesians 1:6, 12, 14). When your will desires God's will to be done, you pray to the glory of God above all else (John 11:40). Prayer is submitting our will to God's glory in all things.