Eugene Peterson writes: "The goal, the highest good, of the human creature is that the knowledge of God and prayer to God converge."
Could this explain why God calls David "a man after his own heart"? David was a man of prayer. Despite the circumstances of his life, and some enormous mistakes of his own doing, David never ceased to pray to God. In the Psalms, if the historicity of the superscriptions are credible, we have preserved for us many prayers of David, uttered at high points and low points alike in his life. Simply, David never forgot God, and God continued to bless him.
Let us learn from David and communicate with God often and unceasingly.