"Then comes the king's cry: 'I waited patiently for the Lord; he inclined to me and heard my cry.' One of the reasons God loved David so much was that he cried so much. 'I am weary with my moaning; every night I flood my bed with tears; I drench my couch with my weeping' (Ps. 6:6). 'You have kept count of my tossings; put my tears in your bottle. Are they not in your book?' (Ps 56:8). It is a beautiful thing when a broken man genuinely cries out to God.
Then after the cry you wait. 'I waited patiently for the Lord.' This is crucial to know: saints who cry to the Lord for deliverance from pits of darkness must learn to wait patiently for the Lord. there is no statement about how long David waited...Only God knows how long we must wait. The prophet Micah experienced prolonged and painful waiting. 'I sit in darkness...until [the Lord] pleads my cause and...will bring me out to the light' (Mic. 7:8-9). We can draw no deadlines from God. He hastens or he delays as he sees fit. And his timing is all-loving toward his children. Oh, that we might learn to be patient in the hour of darkness. I don't mean that we make peace with darkness. We fight for joy (emphasis mine). But we fight as those who are saved by grace and held by Christ...
It is utterly crucial that in our darkness we affirm the wise, strong hand of God to hold us, even when we have no strength to hold him. This is the way Paul thought of his own strivings. He said, 'Not that I have already obtained this or am already perfect, but I press on to make it my own, because Christ Jesus has made me his own' (Phil. 3:12). The key thing to see in this verse is that all Paul's efforts to grasp the fullness of joy in Christ are secured by Christ's grasp of him. Never forget that your security rests on Christ's faithfulness first. Our faith rises and fall. It has degrees. But our security does not rise and fall. It has no degrees. We must persevere in faith."
John Piper, When the Darkness Will Not Lift