Q: Is there an obligation to learn the entire night of Shavuot?
A: No. But it is a proper custom. Someone who is unable should try to learn until midnight (Magen Avraham, Orach Chaim 494).
Q: Which is preferable – learning all night and falling asleep during Shacharit or going to sleep?
A: Going to sleep. Davening Shacharit without falling asleep is a basic halachah, and learning all night is a worthwhile addition. The custom of learning Torah the entire night of Shavuot is mentioned by the Magen Avraham (Orach Chaim #494), based on the Zohar, that we dedicate the night to learning Torah in an attempt to rectify a mistake made by the Nation of Israel at the time of the Giving of the Torah. When Hashem “arrived” to give the Torah to the Nation of Israel, we were still sleeping and had to be woken up. The custom therefore developed to stay awake all night to spirituality rectify for the oversleeping and to show our zeal for the Torah. But one should be aware that if he cannot Daven Shacharit with proper concentration, on account of the exhaustion of learning Torah all night, it is better not to stay up since Davening properly is a clear obligation (the Magen Avraham makes this exact point regarding staying up all night on Yom Kippur – see Orach Chaim 611:11).
Q: Which is preferable – learning during the night, or learning during the day, if I will learn more during the day?
A: During the day, since learning more Torah is a basic halachah, and learning Torah all night on Shavuot is a worthwhile addition. This is unlike the ruling of Ha-Rav Chaim Kanvieski that the custom is to learn all night, and it is preferable to learn during the night even if one learns less than he would have during the day (Piskei Shemuot, pp. 81-82).
Although Ha-Rav Yitzchak Zev Soloveitchik, the Brisker Rav, was surprised that people are so particular to stay awake the entire night of Shavuot, which is a custom, while on Pesach night, where there is a law to discuss the Exodus from Egypt until one is overcome by sleep, people are not so careful. And in the city of Brisk, people were not careful to follow the custom of staying awake the entire night of Shavuot, since why is this night different from all other nights? And also, learning on Shavuot night is not more important than learning during the day (Uvdot Ve-Hanhagot Le-Beit Brisk vol. 2, p. 79).
And it is related in the book "Ha-Shakdan" (vol. 2, p. 240) that one of Ha-Rav Yosef Shalom Elyashiv's grandsons once asked him why he does not stay awake all night on Shavuot like everyone else, but follows his regular learning schedule of waking up at 2:00 AM to learn Torah… Rav Elyashiv explained that he calculated that if he changed his few hours of sleep on that night, he would not gain more time to learn Torah, and he would actually lose 15 minutes of learning! For a few precious minutes of learning Torah, he decided that it is preferable to go to sleep at the beginning of the night as usual…
And Gerrer Chasidim have a saying: Our Tikun Leil Shavuot is Keriyat Shema Al Ha-Mita (reciting the Keriyat Shema before going to bed)…
And Gerrer Chasidim have a saying: Our Tikun Leil Shavuot is Keriyat Shema Al Ha-Mita (reciting the Keriyat Shema before going to bed)…
Therefore, each person should therefore carefully consider if it is worthwhile for him to stay up all night since there is a concern that "his gain is offset by his loss."