David had the courage to admit he was poor and needy. Something most future kings wouldn’t admit. Yet he didn’t just say it to just anyone. He said it to someone he knew who would care. He said it to God. He was amazed! So am I! He probably did it in private. Yes it was all a miracle.
I wonder if he knew the psalms would be read by many.