We mentioned above that there is a widely accepted minhag to stay up on Shavuos night, learning Torah. The difficulty is, how can there be such a minhag, most people are accustomed to going to sleep at night, and by missing a night’s sleep one is being mevatel [missing out on] the mitzvah of oneg Yom Tov. The Rema (Orach Chaim 290) rules that if one normally sleeps in the afternoon, he must do so on Shabbos as well. For such a person sleeping in the afternoon is an oneg, and there is a mitzvah of oneg Shabbos. If so, why is there a minhag to stay up on Shavuos night, what is with the mitzvah of oneg Yom Tov?
Some answer very simply, that although there is a mitzvah of oneg Shabbos, there is no mitzvah of oneg Yom Tov. Going to sleep is oneg, and on Yom Tov there is no such mitzvah, therefore, it’s ok to forfeit a night’s sleep.
Various Proofs that There Is No Mitzvah of Oneg Yom Tov
There are a number of rayas [proofs] to the above:
1) Rashi in Beitzah (37a d.h. otu) writes that Chazal avoided making a certain decree because they didn’t want to ruin “oneg Shabbos or simchas Yom Tov”. Rashi mentions the mitzvah of simchas Yom Tov, and not oneg, therefore, it seems that there is no such mitzvah as oneg Yom Tov.
2) The Avudraham (Hilchos Ma’ariv shel Shabbos) brings from one of the Rishonim, that we don’t make a berachah when lighting Yom Tov candles, as we don’t find a mitzvah of oneg by Yom Tov - we only find it by Shabbos.
3) Similarly, the Pnei Yehoshuah (Beitzah 34) and Pischei Teshuvah (Yoreh De’ah 331:11) say, that although Shabbos is kove’a for ma’aser (normally if one just has a snack from his produce he doesn’t need to separate tithes, however, if one has a snack on Shabbos he does) Yom Tov isn’t, as on Yom Tov there is no mitzvah of oneg.
We see from all the above, that there is no mitzvah of oneg Yom Tov, therefore, we can understand very simply whey there is no problem of staying up all night on Shavuos.
Proofs Against
However, from many poskim it seems that there is in fact a mitzvah of oneg Yom Tov, the same way that we find that there is a mitzvah of oneg Shabbos:
1) The Rambam (Hilchos Yom Tov 6:16) writes: כשם שמצוה לכבד שבת ולענגה כך כל ימים טובים שנאמר לקדוש ה' מכובד וכל ימים טובים נאמר בהן מקרא קדש, וכבר בארנו הכיבוד והעינוג בהלכות שבת - “Just like there is a mitzvah to honor Shabbos and glorify it, so too by all Yomim Tovim .... We have already explained, the laws of how to honor and glorify it in Hilchos Shabbos”.
2) Similarly, the Tur (Hilchos Yom Tov 529) writes: מצות יום טוב לחלק אותו חציו לבית המדרש וחציו לאכילה ושתייה ואף על פי שצריך כל אדם לצמצם יציאותיו אל יצמצם בהוצאת יום טוב וצריך לכבדו ולענגו כדרך שמענג ומכבד השבת - “There is a mitzvah on Yom Tov to split the day into two, half for the beis hamedrash, and half for eating and drinking. Although a person must be careful with what he spends, he shouldn’t be stingy when it comes to spending on Yom Tov. One needs to honor it and glorify it, like one honors and glorifies Shabbos.”
3) Similarly, the Shulchan Aruch (sif 1) writes: וצריך לכבדו ולענגו כמו בשבת - “One must honor it and glorify it, like he does on Shabbos.”
4) The Gaon and Shulchan Aruch HaRav also take on, that there is a mitzvah of oneg Yom Tov (see also sefer HaManhig 96).
If we take on that there is mitzvah of oneg Yom Tov, how can we answer our original question?
What Greater Oneg Yom Tov Is There, Than Staying Up All Night Learning
The Shulchan Aruch (Orach Chaim 288) rules that one is allowed to fast a ta’anis chalom [a fast one does when having a bad dream] on Shabbos, כיון שנפשו עגומה עליו וזה עונג דידיה – since one is feeling very down and fasting helps annul the bad dream, it’s enjoyable for such a person to fast.
Although on Shavuos one isn’t allowed to fast a ta’anis chalom, as there is a din of chatzi lochem (one must spend at least half the day eating, drinking and rejoicing), the din of chatzi lochem obligates one to eat, however, it doesn’t obligate one to sleep. Therefore, we can say, fulfilling the minhag Yisroel of staying up all night learning, gives a person great joy, therefore, just like one is allowed to fast a ta’anis chalom on Shabbos, similarly, although there is a din of oneg Yom Tov, since it’s enjoyable to stay up all night learning, one is allowed to do so.