When faced with his son’s conspiracy and rebellion, David prayed, “O Lord, let Ahithophel give Absalom foolish advice (2 Samuel 15:31).”
But then he got a different idea. He asked Hushai to counter Ahithophel’s good advice. And that’s how the Lord restored David’s kingdom (from 2 Samuel 17:14).
Prayer is a process. You don’t have to figure everything out before you talk to God. He will listen and do what is best.