The Maharal in his commentary on the Haggada (Gevurot Hashem) explains the significance that the Tannaim were relating the story of the Exodus until they were informed by a student that it was time for the morning recitation of the Shema. He says that it is to inform us how it was that they were able to stay up all night in spite of the biblical prohibition of mitzta'er (causing oneself to suffer) on Yom Tov, namely, that they became so engrossed in sippur yetziat mitzrayim, they simply lost track of time. This raises an obvious question regarding the recently* widespread custom of staying up all night, e.g. on Shavuot. Is there a discussion in contemporary (or earlier) halachic authorities about mitzta'er with regard to staying up all night (especially in reference to the contemporary custom on Shavuot)?
*The Aruch HaShulchan mentions a custom of pious individuals to stay up all night on Shavuot. This custom perhaps would have been less problematic since those individuals may have been qualified to gauge their own ability to stay up without halachically-significant discomfort.