I’m not quite sure what you’re asking when you speak of a “prayer in God.” I have done a search of that phrase in the whole Bible (which would include every reference to King David and prayer) and there is not one verse or passage which refers to a “prayer in God.” There are verses that definitely refer to a “prayer TO God” and thus I would like to quote some verses where King David offered “prayers to God.” Before I do, I must say that because David prayed often to God, he was surely “interested in prayer.” It was a vital part of his daily walk with God. He wasn’t a heathen king, so he didn’t pray to “false gods” like the kings who ruled in the nations surrounding Israel.  David knew the “One true God” (see Deuteronomy 4:35, 39; 6:4; 32:39; 1st Kings 8:60; 2nd Kings 19:50; Psalm 18:31; Psalm 86:10; Isaiah 43:10-11; 44:6; 46:9; John 17:3 and 1st John 5:20) and it was his privilege to “pray to the One true God.”

Here are some verses from the Psalms (using the NASB) where David “prayed to God”:

Psalm 4:1: “ANSWER ME WHEN I CALL, O God of my righteousness! You have relieved me in my distress; be gracious to me and HEAR MY PRAYER.”

Psalm 42:8: “The LORD will command His lovingkindness in the daytime; and His song will be with me in the night, a PRAYER TO THE GOD OF MY LIFE.”

Psalm 69:13: “But as for me, MY PRAYER IS TO YOU, O LORD, at an acceptable time; O God, in the greatness of Your lovingkindness, ANSWER ME with Your saving truth.”

Psalm 86:3: “Be gracious to me, O Lord, for TO YOU I CRY ALL DAY LONG.”

Psalm 88:9: “My eye has wasted away because of affliction; I have CALLED UPON YOU EVERY DAY, O LORD; I have spread out my hands to You.”

These verses express the heartfelt prayers of David to God. We see in each prayer his utter dependence on God to meet his varied needs and that he trusted in God’s LOVINGKINDNESS to meet those needs. We see in the last two references that David PRAYED DAILY to his God. He, like all believers, faced daily trials and temptations and his one true resource that he could count upon to help him in these trials and temptations was the ONE TRUE GOD, and thus he would “cry out to God all day and every day.”

In closing, David’s “prayer life” should be emulated by every believer in Christ. We have no strength of our own to meet the challenges and trials of the day, so we too should “cry all day long” to our faithful God and Father in order to meet our daily challenges and trials in His strength. God bids us to do this in Hebrews 4:14-16: “Seeing then that we have a great High Priest who has passed through the heavens, Jesus the Son of God, let us hold fast our confession. For we do not have a High Priest who cannot sympathize with our weaknesses, but was in all points tempted as we are, yet without sin. Let us therefore COME BOLDLY TO THE THRONE OF GRACE, THAT WE MAY OBTAIN MERCY AND FIND GRACE TO HELP IN TIME OF NEED.”  (420.3)  (DO)