On one hand, Shabbat is a time for rest and enjoyment - "menucha vesimcha or layehudim". On the other hand, according to the Yerushalmi "Shabbat and holidays were only given to Israel in order to do Torah study." So what is the purpose of Shabbat - to enjoy and refresh ourselves, or to learn Torah?
This article tries to reconcile the sources by saying that Torah study itself should constitute enjoyment. While true, this answer solves only half the problem at most. For while Torah study may be enjoyable, it is not restful. One who learns Torah all week long cannot "rest" by pursuing the same routine on Shabbat. And deep Torah study is considered strenuous rather than restful: " 'This is the Torah: when a person dies in a tent' - words of Torah are preserved only by one who kills himself over them." (Brachot 43b). How can Shabbat be a time for both rest and this kind of extreme effort?
Before solving the difficulty, let's extend it with the help of a cute gemara in Eruvin 56a. "R' Yehudah said: Night was created only for sleep. R' Shimon ben Lakish said: The moon was created only for study."* Each rabbi points to an aspect of nature (darkness and the moon) which makes possible their preferred nighttime activity (sleep and Torah study). Apparently nighttime, like Shabbat, is a time when we should be both resting and learning Torah. Yet R' Yehudah and Reish Lakish disagree, because is impossible for a person to do both simultaneously.
Perhaps this tension between rest and Torah study is not unique to night, or to Shabbat, but occurs whenever one has the opportunity to rest. If so, then the gemara in Brachot 64b suggests itself as a resolution to our question. "R' Chiya bar Ashi says in the name of Rav: Torah scholars have no rest, neither in this world nor in the world to come, as it says: 'They will go from strength to strength, they will appear before God in Zion'."
Here we find the answer to our question: what is required of Torah scholars may not be suitable for normal people. It seems that "rest", including that of nighttime and Shabbat, is an accepted part of life that most people can and should partake in. But Torah scholars are not "most people". One who aspires to be not only a good person but a leader must sacrifice some legitimate elements of his personal life. The responsibility a Torah scholar takes upon himself, in transmitting Jewish tradition from one generation to the next and supplying spiritual guidance for the rest of his generation, means that one will not be able to rest at every time he finds it desirable.
Of course, even the most righteous human being remains human. It is not possible to refrain entirely from sleeping at night, and even one who constantly learns Torah must differentiate in some way between Shabbat and weekdays. There are physical and psychological limits on what any person can accomplish. But up to these limits, comforts that are legitimate and even Torah-encouraged in one's personal life must sometimes be sacrificed for the common good.
*Based on this, the Rambam (Hilchot talmud torah 3:13) says that a person learns most of his Torah wisdom at night. The Rambam goes further then the gemara in saying that night is not just a time for Torah, but MORE of a time than the day is. Presumably, this reflects the Rambam's expectation that a person work during the day.