The Unique Custom of Learning on Shavuot Night
What are we supposed to do on Yom Tov?
(יד) וְשָׂמַחְתָּ֖ בְּחַגֶּ֑ךָ אַתָּ֨ה וּבִנְךָ֤ וּבִתֶּ֙ךָ֙ וְעַבְדְּךָ֣ וַאֲמָתֶ֔ךָ וְהַלֵּוִ֗י וְהַגֵּ֛ר וְהַיָּת֥וֹם וְהָאַלְמָנָ֖ה אֲשֶׁ֥ר בִּשְׁעָרֶֽיךָ׃

(14) You shall rejoice in your festival, with your son and daughter, your male and female slave, the Levite, the stranger, the fatherless, and the widow in your communities.

What does "rejoice in your festival" refer to?

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

(יח) כֵּיצַד. הַקְּטַנִּים נוֹתֵן לָהֶם קְלָיוֹת וֶאֱגוֹזִים וּמִגְדָּנוֹת. וְהַנָּשִׁים קוֹנֶה לָהֶן בְּגָדִים וְתַכְשִׁיטִין נָאִים כְּפִי מָמוֹנוֹ. וְהָאֲנָשִׁים אוֹכְלִין בָּשָׂר וְשׁוֹתִין יַיִן שֶׁאֵין שִׂמְחָה אֶלָּא בְּבָשָׂר וְאֵין שִׂמְחָה אֶלָּא בְּיַיִן.

(17) ...One is required to rejoice and be cheerful on those days, along with his wife, children, grandchildren, and all his dependents, as it is written: "You shall rejoice at your festival, you and your son and your daughter, your male and female servants…" (Deuteronomy 16:14). Although the festivity mentioned here refers to the peace-offering, as we are about to explain in the section concerning the rules of the pilgrim-offering, it includes the appropriate rejoicing of each man and his children and the members of his household.

(18) The children, for example, should be given parched grain, nuts, and sweetmeats; the womenfolk should be presented with pretty clothes and trinkets according to one's means; the menfolk should eat meat and drink wine, for there is no real rejoicing without the use of meat and wine.

What about resting on Shabbat/Yom Tov?

חידושי מאירי מסכת שבת

מצות עונג שבת גדולה עד מאד ועדנו הוא לפי ממונו של אדם ולפי מה שרגיל בו בחול והוא שאמרו אפי׳ דבר מועט ועשאו לצורך שבת לכבדו הרי קיים עונג שבת וכללי...

ובירושלמי אמרו במה מענגו מר אמר בשינה ומר אמר בתלמוד תורה ולא פליגי כאן בתלמיד כאן בבעל הבית, ופירשו בה רבותי שהתלמיד מענגו בתלמיד תורה ובעל הבית בשינה...

Who allowed you to stay up all night on Leil Yom Tov?!

דתניא רבי אליעזר אומר אין לו לאדם ביום טוב אלא או אוכל ושותה או יושב ושונה רבי יהושע אומר חלקהו חציו לאכילה ושתיה וחציו לבית המדרש ואמר רבי יוחנן ושניהם מקרא אחד דרשו כתוב אחד אומר עצרת לה׳ אלהיך וכתוב אחד אומר עצרת תהיה לכם רבי אליעזר סבר או כולו לה׳ או כולו לכם ורבי יהושע סבר חלקהו חציו לה׳ וחציו לכם: (עבם סימן) אמר רבי אלעזר הכל מודים בעצרת דבעינן נמי לכם מאי טעמא יום שניתנה בו תורה הוא

For it was taught in a baraita Rabbi Eliezer says: A person has nothing but to choose on a Festival; he either eats and drinks or sits and learns the entire day. While Rabbi Yehoshua says: Divide the day, half of it for eating and drinking and half of it for the study hall, for he holds that eating and drinking are obligatory on the Festival. And Rabbi Yoḥanan said: And both of them derived their opinions from one verse, For one verse says: “It shall be an assembly for the Lord your God; and another verse says: “It shall be an assembly for you;. Rabbi Eliezer holds the day is to be either entirely for God or entirely for you. And Rabbi Yehoshua holds that it is possible to fulfill both verses: Split the day into two, half of it for God and half of it for you. Rabbi Elazar said: All agree with regard to Shavuot, that we require that it be also “for you,” meaning that it is a mitzva to eat, drink, and rejoice on that day. What is the reason? It is the day on which the Torah was given, and one must celebrate that.

One possible answer...

...איתא בזוהר שחסידים הראשונים היו נעורים כל הלילה ועוסקים בתור' וכבר נהגו רוב הלומדים לעשות כן ואפשר לתת טעם ע"פ פשוטו לפי שישראל היו ישנים כל הלילה והוצרך הקדוש ברוך הוא להעיר אותם כדאיתא במדרש לכן אנו צריכים לתקן זה:

(1) ...It says in the Zohar that the original pious ones would be awake all the night working in Torah. And already most of those who learn do this. It's possible to give a reason for this according to its simple understanding, that Israel slept all the night, and the Holy One Blessed be He had to wake them, as the midrash says. Therefore, we need to fix this.

The (חידושי ישועות יעקב (סימן תצד suggests another answer from the Medrash...

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

(4) The Israelites did not accept the Torah until the Holy One, blessed be He, arched the mountain over them like a vessel, as it is said: And they stood beneath the mountain (Exod. 19:17). R. Dimi the son of Hama stated that the Holy One, blessed be He, told Israel: If you accept the Torah, well and good; but if not, your grave will be there. If you should say that He arched the mountain over them because of the Written Law, isn’t it true that as soon as He said to them, “Will you accept the Torah?” they all responded, “We will do and hear,” because the Written Law was brief and required no striving and suffering, but rather He threatened them because of the Oral Law. After all, it contains the detailed explanations of the commandments, both simple and difficult, and it is as severe as death, and as jealous as Sheol. One does not study the Oral Law unless he loves the Holy One, blessed be He, with all his heart, with all his soul, and with all his might, as it is said: And thou shalt love the Lord thy God with all thy heart, with all thy soul, and with all thy might (Deut. 6:5).

So what should one learn on Shavuot night?

ספר השל"ה הקדוש מסכת שבועות פרק נר מצוה, ה

ולהראות גדולת מעלת זאת הלילה (=לימוד התורה בליל שבועות), איך שחביב לפני הקדוש ברוך הוא לבלתי נדום רגע אחת מדביקות התורה. גם יש רשות להפסיק בין ענין לענין לדבר דברי התעוררות מוסר ופשפוש מעשים ולתקן תקנות ליראת ה'. אכתוב לכם מעשה שאירע קרוב לזמנינו והועתק מכתב המקובל הר"ר שלמה הלוי אלקביץ שהיה מתחבר בבית של רבינו בית יוסף והופיע עליו רוח הקודש.

כף החיים על שולחן ערוך אורח חיים תצד:ז

וסדר הלימוד לליל שבועות כתוב שם בהקד' הזוה"ק דאיהי אתתקנת למלעי באורייתא מתורה לנביאים ומנביאים לכתובים ובמדרשות דקראי וברזי דחכמתא ...וכ"כ בשער הכוו' שם וז"ל וזהו סדר הלימוד של המקרא שתעסוק בו בלילה הזה כדי להמשיך הכתר הנז' תתחיל מפ' בראשית ותקרא פ' בראשית עד אלה תולדות השמים והארץ בהבראם וכו' ואח"כ תדלג ותקרא ג' פסוקים האחרונים של בראשית. ומשם ואילך תקרא ג' פסוקים הראשונים וג' אחרונים מכל פרשה ופרשה משאר פרשיות.

פרקי דרבי אליעזר פרק מו

רבי יהושע בן קרחה אומר ארבעים יום עשה משה בהר, קורא במקרא ביום ושונה במשנה בלילה.

כי אם בתורת ה' חפצו א"ר אין אדם לומד תורה אלא ממקום שלבו חפץ שנאמר (תהלים א, ב) כי אם בתורת ה' חפצו לוי ור"ש ברבי יתבי קמיה דרבי וקא פסקי סידרא סליק ספרא לוי אמר לייתו [לן] משלי ר"ש ברבי אמר לייתו [לן] תילים כפייה ללוי ואייתו תילים כי מטו הכא כי אם בתורת ה' חפצו פריש רבי ואמר אין אדם לומד תורה אלא ממקום שלבו חפץ אמר לוי רבי נתת לנו רשות לעמוד

“But his delight is in the Torah of the Lord” Rebbe says: A person can learn Torah only from a place that his heart desires, as it is stated in that verse. Levi and Rabbi Shimon, son of Rebbe, were sitting before Rebbe and they were learning Torah. They finished the book, Levi said: let them bring us the book of Proverbs; and Rabbi Shimon said: Let them bring us Psalms. He compelled Levi to acquiesce, and they brought Psalms. When they arrived here, at the verse: “But his delight is in the Torah of the Lord,” Rebbe explained the verse and said: A person can learn Torah only from a place in the Torah that his heart desires. Levi said: My teacher, you have given us permission to rise and study Proverbs.