Deuteronomy 24:13

13 Return their cloak by sunset so that your neighbor may sleep in it. Then they will thank you, and it will be regarded as a righteous act in the sight of the LORD your God.

Read Deuteronomy 24:13 Using Other Translations

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.
You shall restore to him the pledge as the sun sets, that he may sleep in his cloak and bless you. And it shall be righteousness for you before the LORD your God.
Return the cloak to its owner by sunset so he can stay warm through the night and bless you, and the LORD your God will count you as righteous.

What does Deuteronomy 24:13 mean?

John Gill's Exposition of the Bible
Deuteronomy 24:13

In any case thou shalt deliver him the pledge again, when the
sun goeth down
If it was a night covering, as Jarchi remarks; but if it was his day clothes, he was to return it in the morning, when the sun arose; and this was to be done every day, which resist occasion a great deal of trouble, and the pledge of little use; so that it seems as though they might as well be without it as have it, and lend freely; but the Jews say, that there was an advantage by it; for it is said in answer to such a question,

``of what profit is the pledge? by this means the debt is not released on the seventh year, (when all other debts were released, ( Deuteronomy 15:1 Deuteronomy 15:2 ) ) nor could the borrower dispose of his goods to his children, but payment was made from the pledge after his death F13:''

now this delivery of the pledge at sun setting was ordered,

that he may sleep in his own raiment;
have his night covering to sleep in, his pillow, and bolster, and bedding to lie on, and bed clothes to cover him; and indeed the clothes they wore were made in such form, as would serve for covering to sleep in at night, as well as to wear in the day; and such is the clothing of the Arabs now, which they call "hykes".

``The usual size of them (Dr. Shaw says F14), is six yards long, and five or six feet broad, serving the Arab for a complete dress in the day; and as they "sleep in their raiment", it serves likewise for his bed and covering by night:''

and bless thee:
for using him so mercifully and kindly, as to return him his pledge, which is so necessary to his comfortable repose in the night; and not only will he praise him, and speak well of him for it, and give him thanks; but will pray to God to bless him in soul, body, and estate, for such kindness shown him:

and it shall be righteousness unto thee before the Lord thy God;
not his justifying righteousness before God, for by the deeds of the law shall no flesh living be justified in his sight; but it shall be owned and approved of as a good and righteous action, and answerable to the intention of this law, which is, that mercy should be shown to persons in distress; in which sense the word "righteousness" is sometimes used, even for a merciful action, ( Psalms 112:9 ) ( Daniel 4:27 ) ; so alms is called (dikaiosunh) , "righteousness", ( Matthew 6:1 ) , in some copies.


FOOTNOTES:

F13 Maimon Hilchot Milvah Velovah, c. 3. sect. 5.
F14 Travels, p. 224. Ed. 2.
California - Do Not Sell My Personal Information  California - CCPA Notice