סימן קצח סעיף ג
אָסוּר לְהָלִין אֶת הַמֵּת, שֶׁנֶּאֱמַר, לֹא תָלִין וְגוֹ' כִּי קָבוֹר תִּקְבְּרֶנּוּ בַּיוֹם הַהוּא. וְאִם מְלִינוֹ מִשׁוּם כְּבוֹדוֹ לְהָבִיא לוֹ אָרוֹן וְתַכְרִיכִין אוֹ שֶׁיָבוֹאוּ קְרוֹבָיו אוֹ סַפְדָּנִים, מֻתָּר, דְּלֹא אָסְרָה תוֹרָה אֶלָּא דֻמְיָא דְתָלוּי, שֶׁהוּא דֶרֶךְ בִּזָיוֹן. אֲבָל לֹא כְּשֶׁהוּא לִכְבוֹדוֹ. וְכֵן אִם נִמְצָא אֵיזֶה מֵת וְלֹא נוֹדַע בְּבֵרוּר מִי הוּא, מֻתָּר לַהֲלִינוֹ עַד שֶׁיָבוֹאוּ עֵדִים אוֹ אִשְׁתּוֹ לְהַכִּירוֹ.
It is forbidden to allow the deceased to remain overnight, as it is said, "You shall not let it remain etc., but you shall surely bury him the same day."1Deuteronomy 21:23. To let him remain for his honor, to arrange for a coffin, or shrouds, or to await the arrival of relatives, or eulogizers, is permitted.2There are later Poskim who maintain that even for the honor of the deceased it is forbidden to delay the burial for more than twenty four hours. Divrei Malkiel Volume II 95, Chamisha Mamuros folio 129 For the Torah forbids delaying the burial only in such a case as when one is hanged, for it leads to disgrace of the dead, but not when it is for his honor. Likewise, if a corpse was found and his identity has not been established, it is permitted to keep the body until witnesses come, or until his wife comes to identify him.
תנא דבי אליהו כל השונה הלכות בכל יום מובטח לו שהוא בן העולם הבא שנאמר הליכות עולם לו אל תקרי הליכות אלא הלכות (נדה ע"ג.)