Return the cloak by sunset so that your neighbor may sleep in it. Then you will be thanked, and it will be regarded as a righteous act in the sight of the LORD your God.
NIV
You shall surely restore to him the pledge at sunset, that he may sleep in his garment and bless you; and it shall be credited to you as righteousness (rightness and justice) before the Lord your God.
AMP
In any case thou shalt deliver him the pledge again when the sun goeth down, that he may sleep in his own raiment, and bless thee: and it shall be righteousness unto thee before the LORD thy God.
KJV