We can pray to God for anything anytime, but He is allowed to respond.
The fact that we can communicate with a timeless being is itself hard to fathom. Check out this passage about Hezekiah who, upon hearing that the Assyrians would come to destroy him, prays to God. God then decides to act based on Hezekiah's prayer...or does He?
Isaiah 37:14,15,20-23,26 ESV Hezekiah received the letter from the hand of the messengers, and read it; and Hezekiah went up to the house of the Lord, and spread it before the Lord. And Hezekiah prayed to the Lord: ... "So now, O Lord our God, save us from his hand, that all the kingdoms of the earth may know that you alone are the Lord.”
Then Isaiah the son of Amoz sent to Hezekiah, saying, “Thus says the Lord, the God of Israel: Because you have prayed to me concerning Sennacherib king of Assyria, this is the word that the Lord has spoken concerning him: Whom have you mocked and reviled? Against whom have you raised your voice and lifted your eyes to the heights? Against the Holy One of Israel! ... Have you not heard that I determined it long ago? I planned from days of old
what now I bring to pass, that you should make fortified cities crash into heaps of ruins,
Within the same statement God says "because you prayed" and "I determined it long ago." This is how it works when created things within time (us) communicate with a being outside of it (God).
In one sense (form our perspective), our prayers can certainly influence God's decisions in our lives. Jesus knew this and asked God to change His mind:
Luke 22:41-42 ESV And he withdrew from them about a stone's throw, and knelt down and prayed, saying, “Father, if you are willing, remove this cup from me. Nevertheless, not my will, but yours, be done.”
But in another sense (from the viewpoint of God) his will has already been predetermined. This is something we simply cannot understand, and that's OK. What we do know is that God has set up the universe in such a way that we can, and should, ask him for things all the time. If what we're asking for is good and not sin then it's fair game.
Matthew 7:7-8 ESV Ask, and it will be given to you; seek, and you will find; knock, and it will be opened to you. For everyone who asks receives, and the one who seeks finds, and to the one who knocks it will be opened.