Learning How to Rashi: What exactly is sleep?
(כא) וַיַּפֵּל֩ ה' אֱלֹקִ֧ים ׀ תַּרְדֵּמָ֛ה עַל־הָאָדָ֖ם וַיִּישָׁ֑ן וַיִּקַּ֗ח אַחַת֙ מִצַּלְעֹתָ֔יו וַיִּסְגֹּ֥ר בָּשָׂ֖ר תַּחְתֶּֽנָּה׃
(21) So the LORD God cast a deep sleep upon the man; and, while he slept, He took one of his ribs and closed up the flesh at that spot.

(כא) ויפל, תרדמה על האדם לפי הפשט חס הקב״‎ה על אדם הראשון שלא להכאיבו לפיכך הפיל עליו תרדמה.

(21) .ויפל תרדמה על האדם, according to the plain meaning of the text, the meaning of this phrase is that “G-d cast a deep sleep over Adam;” this was so that the surgery He performed on him should not cause him any pain. He made him unconscious.

(ה) וַיַּפֵּל ה' אֱלֹקִים תַּרְדֵּמָה (בראשית ב, כא), רַבִּי יְהוֹשֻׁעַ דְּסִכְנִין בְּשֵׁם רַבִּי לֵוִי אָמַר תְּחִלַּת מַפָּלָה שֵׁנָה, דָּמַךְ לֵיהּ וְלָא לָעֵי בְּאוֹרַיְתָא, וְלָא עָבֵיד עֲבִידְתָּא. רַב אָמַר שָׁלשׁ תַּרְדֵמוֹת הֵן, תַּרְדֵּמַת שֵׁנָה, וְתַרְדֵּמַת נְבוּאָה, וְתַרְדֵּמַת מַרְמִיטָה. תַּרְדֵּמַת שֵׁנָה וַיַּפֵּל ה' אֱלֹקִים תַּרְדֵּמָה עַל הָאָדָם וַיִּישָׁן. תַּרְדֵּמַת נְבוּאָה (בראשית טו, יב): וַיְהִי הַשֶּׁמֶשׁ לָבוֹא וְתַרְדֵּמָה נָפְלָה עַל אַבְרָם. תַּרְדֵּמַת מַרְמִיטָה (שמואל א כו, יב): אֵין רֹאֶה וְאֵין יוֹדֵעַ וְאֵין מֵקִיץ כִּי כֻלָּם יְשֵׁנִים כִּי תַּרְדֵּמַת ה' נָפְלָה עֲלֵיהֶם. רַבָּנָן אָמְרֵי אַף תַּרְדֵּמָה שֶׁל שְׁטוּת, דִּכְתִיב (ישעיה כט, י): כִּי נָסַךְ עֲלֵיכֶם ה' רוּחַ תַּרְדֵּמָה. רַבִּי חֲנִינָא בַּר יִצְחָק אָמַר שָׁלשׁ נוֹבְלוֹת הֵן, נוֹבֶלֶת מִיתָה, שֵׁנָה. נוֹבֶלֶת נְבוּאָה, חֲלוֹם. נוֹבֶלֶת הָעוֹלָם הַבָּא, שַׁבָּת. רַבִּי אָבִין מוֹסִיף עוֹד תַּרְתֵּין, נוֹבֶלֶת אוֹרָה שֶׁל מַעְלָה, גַּלְגַּל חַמָּה. נוֹבֶלֶת חָכְמָה שֶׁל מַעְלָה, תּוֹרָה.

(5) "And the Lord God caused a deep sleep to fall." Rabbi Joshua of Sichnin in the name of Rabbi Levi said: the beginning of a man's downfall is sleep. When asleep, he does not engage in study or work. Rav said: there are three types of deep sleep: the deep sleep of sleep; the deep sleep of prophecy; and the deep sleep of a trance. The deep sleep of sleep: "And the Lord God caused a deep sleep [tardemah] to fall on Adam, and he slept" (Genesis 2:21). The deep sleep of prophecy: "And the sun went down and a deep sleep [tardemah] fell over Avram" (Genesis 15:12). The deep sleep of a trance: "And no one saw, and no one knew and no one awoke because all were sleeping, because the deep sleep [tardemah] of God has fallen on them" (Samuel I 26:12). The Rabbis said: [there is a fourth type] even the deep sleep of folly, as it is written: "Because God poured upon you the spirit of deep sleep [tardemah]" (Isaiah 29:9). Rabbi Hanina bar Yitzchak said: there are three varieties of analogy: A taste of death - is sleep; a taste of prophecy - is dreaming; a taste of the world to come - is Shabbat. Rabbi Avin added two more: a taste of the light of heaven - is the sun; a taste of the wisdom of heaven - is Torah.