"For You, O LORD of hosts, the God of Israel, have made a revelation to Your servant, saying, 'I will build you a house'; therefore Your servant has found courage to pray this prayer to You."
2 Sam 7:27 (emphasis mine)
Contrary to popular belief, divine sovereignty does not discourage prayer. The biblical position is actually just the opposite.