4 “He has meditated iniquity on his bed.” What said He, “On his bed?”. “The ungodly has said in himself, that he will sin:” what above he said, in himself, that here he said, “On his bed.” Our bed is our heart: there we suffer the tossing of an evil conscience; and there we rest when our conscience is good. Whoso loves the bed of his heart, let him do some good therein. There is our bed, where the Lord Jesus Christ commands us to pray. “Enter into your chamber, and shut your door.” What is, “Shut your door?”
Expect not from God such things as are without, but such as are within; “and your Father which sees in secret, shall reward you openly.” Who is he that shuts not the door? He who asks much from God such things, and in such wise directs all his prayers, that he may receive the goods that are of this world. Your door is open, the multitude sees when you pray. What is it to shut your door? To ask that of God, which God alone knows how He gives. What is that for which you pray, when you have shut the door? What “eye has not seen, nor ear heard, or has entered into the heart of man.” And haply it has not entered into your very bed, that is, into your heart. But God knows what He will give: but when shall it be? When the Lord shall be revealed, when the Judge shall appear....
Source: The Enarrations, or Expositions, on the Psalms (New Advent)