Q. If one would have a net loss of learning over Shavuos by staying up all night learning because would be too exhausted to learn over the rest of Yom Tov, is it better to go to sleep or should one stick the minhag and learn Shavuos night?
A. The source for staying awake all of the first night of Shavuos and learning Torah is mainly the Zohar on Parshios Emor and Bereshis (9). Magen Avraham (494:) quotes also from Medresh that the reason is to atone for their lateness since Hashem had to awaken the people as the were still asleep when the time for receiving of the Torah began. (See M. B. ibid. 1).
Mishnah Berura (ibid. also quotes the Arizal, that one that learns without interruption, merits to to complete the year without suffering any loss or harm. Seforim stress and assert the outstanding achievements to be acquired by learning properly and with joy on that night. (See Sheloh on Maseches Shavuos).
However, Nitei Gavriel (Shavuos 21: n. 4) quotes Mishmeres Sholom’s ruling that if one is not sure he will be able to daven properly in the morning, if he stays awake the whole night, he should better sleep and rest.
Similarly, Horav Shlomo Miller’s Shlit’a opinion is that if by staying up and learning on that night, one would neglect learning the rest of the Yom Tov, he should better sleep as required.
Rabbi A. Bartfeld as revised by Horav Shlomo Miller Shlit’a