Have you heard another say to you, "How does he sleep at night!" This is not a question asked, but a pointed and judgmental statement about the thinking or bad actions of the one this remark is pointed to.
How does one sleep at night? Some have a hardened heart, troubled not by any of the day's events and actions. Others have a deceived heart, that is, they see themselves as the victim in just about every regard, they've done nothing wrong. Most, on the other hand, every now and again, do struggle with this.
The new English Translation (NET) reads in Proverbs 3, My child, do not let them escape from your sight; safeguard sound wisdom and discretion. So they will give life to you, and grace to adorn your neck. Then you will walk on your way with security, and you will not stumble. When you lie down you will not be filled with fear; when you lie down your sleep will be pleasant (3:21-24).
Live your life in such a way you minimize your regrets. The best way to do that is to live with the wisdom of the Lord, letting it reign in your heart.