"If you take a pledge." Rabbi Ishmael says: Scripture comes to teach you that you may perform a mitzvah and still take what is yours. "Until the sun sets" — this is the daytime garment, which you return to him for the whole day; the nighttime garment, which you return for the whole night, from where? Scripture teaches, "You shall surely restore to him the pledge" and so forth. From here they said: We take as a pledge a daytime garment at night and a nighttime garment by day, and we return a daytime garment by day and a nighttime garment by night. (Exodus 22:26) "For it is his only covering" — this is the cloak. "It is his garment for his skin" — this is the tunic. "In what shall he sleep?" — to include a hide for bedding. Rabbi Natan says: If a man is found liable to his fellow for a hundred in court, and he has a garment worth two hundred, one does not say to him, "Sell your garment, clothe yourself with a hundred, and give me a hundred." Therefore it says, "For it is his only covering"; you are not permitted to deny him a garment that befits his station. "And I will hear, for I am gracious" — for I created My world with mercy.
You May Take Your Pledge and Still Keep the Poor Man Clothed
Yalkut Shimoni on Torah 351:3
אִם חָבֹל תַּחְבֹּל, רַבִּי יִשְׁמָעֵאל אוֹמֵר, בָּא הַכָּתוּב לְלַמֶּדְךָ שֶׁתְּהֵא עוֹשֶׂה מִצְוָה, וּתְהֵא נוֹטֵל אֶת שֶׁלְּךָ. עַד בֹּא הַשֶּׁמֶשׁ, זֶה כְּסוּת יוֹם שֶׁאַתָּה מַחֲזִיר לוֹ כָּל הַיּוֹם, כְּסוּת לַיְלָה שֶׁאַתָּה מַחֲזִיר כָּל הַלַּיְלָה, (וְכָל הַיּוֹם) מִנָּיִן, תַּלְמוּד לוֹמַר (שם) "הָשֵׁב תָּשִׁיב לוֹ אֶת הֶעָבוֹט" וְגוֹ'. מִכַּאן אָמְרוּ, מְמַשְׁכְּנִין כְּסוּת יוֹם בַּלַּיְלָה וּכְסוּת לַיְלָה בַּיּוֹם, וּמַחֲזִירִין כְּסוּת יוֹם בַּיּוֹם וּכְסוּת לַיְלָה בַּלַּיְלָה. (שמות כב כו) כִּי הִיא כְסוּתֹה לְבַדָּהּ, זוֹ טַלִּית. הִיא שִׂמְלָתוֹ לְעֹרוֹ, זֶה חָלוּק. בַּמֶּה יִשְׁכָּב, לְהָבִיא עוֹר מַצָּע. (וְהָיָה כִּי יִצְעַק אֵלַי וְשָׁמַעְתִּי כִּי חַנּוּן אָנִי) רַבִּי נָתָן אוֹמֵר הֲרֵי שֶׁיָּצָא חַיָּב לַחֲבֵרוֹ מָנֶה בְּבֵית דִּין, וְעָלָיו כְּסוּת בְּמָאתַיִם, לֹא יֹאמַר לוֹ מְכֹר כְּסוּתְךָ וְהִתְכַּסֶּה בְּמָנֶה וְתֵן לִי מָנֶה, לְכָךְ נֶאֱמַר כִּי הִיא כְסוּתֹה לְבַדָּהּ, אִי אַתָּה רַשַּׁאי לִמְנֹעַ מִמֶּנּוּ כְּסוּת, שֶׁהִיא נוֹפֶלֶת לִשְׁאֵרוֹ. וְשָׁמַעְתִּי כִּי חַנּוּן אָנִי, שֶׁבְּרַחֲמִים בָּרָאתִי אֶת עוֹלָמִי.