By Eliezer Brodt
This article will trace some of the earliest sources for the Minhag observed by many to stay up learning Torah throughout the entire night of Shavuos. At the outset I would like to note that the focus of this article will be not be about the exact seder that was learned i.e. Tikun Lel Shavuos.
Different versions of this article originally appeared in the Kulmos Supplement of Mishpacha in 2014 and then in English in 2015. I returned to all this in my doctorate Halachic Commentaries to the Shulchan Aruch on Orach Chayim from Ashkenaz and Poland in the Seventeenth Century. This post contains important additions to some of the earlier versions. One day I hope to update it properly.
That the minhag of staying up on Shavuos night to learn was observed widely in recent history is very clear. For example, the author of a nineteenth-century Lithuanian memoir describes how her brothers would stay up the entire night.
In a memoir about Yeshivas Lomza, the author writes in passing "after staying up the whole night, the whole yeshiva would take part in a milchig kiddush at the Rosh Yeshiva’s house".
Chaim Grade writes: “On the First night of Shavuoth, the lamps in the Beth Medrash and the candelabra were still lit well past midnight. The benches were packed with men from the courtyard and from the neighboring streets who, as the custom on this night, came to study until dawn.” Grade’s books are fiction, but his descriptions are based on life in Vilna.
A bochur describing Shavous in the Mir to his parents in 1938, writes in passing that the bnei hayeshiva had stayed up the whole night learning.
Rav Chaim Stein, Rosh Yeshivah of Telz wrote an incredible World War II diary chronicling his great Mesiras Nefesh for whatever mitzvos he was able to do during that time. He also describes staying up the entire night learning.
But what are the earliest sources for this practice? It is not mentioned by either R. Yosef Caro or the Rama in Shulchan Aruch’s discussion of the halachos of Shavuos.
One of the earliest printed sources for this custom is a work entitled Sefer Ha-Mussar, authored by Rav Yehudah Kalatz and first printed in 1537, which states that there was a custom to stay up throughout both nights of Shavuos to learn various parts of Tanach and Kabbalah. Today we know that the prior written source for this piece is Rav Dovid ben Rav Yehudah Hachassid. This piece is also printed in the Mateh Moshe of Rav Moshe Meis (1591) without citing its source. In 1558, the Zohar was printed for the first time, and in it we find that "righteous ones" would learn Torah during the entire night of Shavuos. These words of the Zohar are already quoted in two early and important collections of material culled from the Zohar, the Mareh Cohen of Rav Yisachar Katz, first printed in 1588 and in the Yesh Sachir of Rav Yisachar M’Karmintz, first printed in 1609. It is also brought down in important works such as Rav Moshe Makir’s classic Seder HaYom [first printed in 1599], Tikunei Shabbos (1613), Tur Barekes (1650), Heichal Hakodesh (1653) and Sha’arei Tzion (1662).
Who followed this minhag in earlier times?
From the Zohar it appears that this practice is limited to yechidei segulah, select spiritually exalted individuals. This is also how it appears that some sources that quote this Zohar, such as the Heichal Hakodesh, Magen Avraham, Eliyah Rabba and Me’orei Or, understood it.
A number of gedolei Torah themselves wrote of having stayed up learning the whole night of Shavuos. In his Sefer Chizyonos, R' Chaim Vital writes that he stayed up the whole night of Shavuos learning with the Arizal. The Chida writes in the account of his travels and in his autobiographical cheshbon hanefesh of having done so, as does the Aderes.
But other sources seem to have understood that this is a custom to be followed by all. Rav Moshe Makir in his Seder HaYom writes so clearly, and indeed, in a letter he wrote circa 1610 to Poland, Rav Shlumiel of Tzefas describes how everyone stayed up to learn on Shavuos night in keeping with the Seder HaYom. The Shelah Hakadosh also describes how everyone stayed up learning, as did Rav Moshe Prague in a letter written in 1650 describing the scene in Yerushalayim.
Thus, we see that what was originally a minhag only for the very learned evolved in a few decades into a practice observed by the broad masses. One may conjecture that the spread of the minhag occurred due to the fact that some of the seforim that mentioned it were very popular and widely read.
The promise of the Arizal
Another possible catalyst for the popular adoption of this minhag was the promise of the Arizal that "he who stays up the whole night learning will survive the year and not suffer any harm during the entire year." This guarantee first appeared in a work called Shulchan Aruch Shel Ha-Arizal printed in 1650, and was later reprinted in numerous widely-read works such as Sha’arei Tzion and Sefer Zechirah.
Relatedly, R. Yosef Kapach, discussing the observance of this minhag in Teiman, writes that this night is a special time during which the gates of Heaven are open for the acceptance of tefillos. He cites a legend of a woman who was looking outside a window and she asked for her head to be made bigger. When that occurred, she could not get her head back inside through the window. It thus became necessary to feed her for the duration of the Yom Tov by means of a ladder, and it was only after Yom Tov, when the window could be broken, that she was finally extricated.
The Visit of the Magid on Shavous night
Yet another reason this minhag may have become so widespread relates to the Maggid, the Heavenly emissary that would regularly visit the Beis Yosef to teach him Torah. The Shelah Hakadosh quotes from a lengthy letter that Rav Shlomo Alkabetz wrote describing the events of one particular Shavuos night in Tzefas.
Rav Shlomo Alkabetz writes that he and Rav Yosef Caro along with some others in their circle decided to stay up the whole night of Shavuos learning a specific seder limud from Tanach and Mishnayos. At about midnight, a voice was heard emanating from the throat of Rav Yosef Caro praising them for staying up to learn Torah and advising them that it would be even more praiseworthy if they were to do so with a minyan. And, indeed, the next night, the scene was repeated, this time with a minyan present.
This letter was first printed in 1646 in the introduction to the first edition of the Magid Meisharim, which records the teachings that the Magid conveyed through the Beis Yosef. It was then reprinted by the Shelah Hakadosh in 1648 and in the very popular and somewhat controversial anonymous work Chemdas Yomim in 1731.These last two sources contributed to widespread knowledge of the story of the Magid of the Beis Yosef, which, in turn, enabled the minhag of learning throughout Shavuos night to become even more popular.
Why doesn't Rav Yosef Caro mention this minhag?
In order to consider some possible reasons for the Rav Yosef Caro’s omission of this minhag from both his Shulchan Aruch and his commentary on the Tur, despite the fact that he was personally told by the Magid about the great importance of remaining awake throughout Shavuos night to learn Torah, it is important to first discuss some issues related to the Magid Meisharim.
Many Gedolim merited visits from Magidim who taught them secrets of Torah, but the most famous person to have been so visited was Rav Yosef Caro. Magid Meisharim, the work that emerged from those visits, is comprised mostly of Kabbalistic teachings, although there is some Halachic discussion there as well. Was that work intended only for Rav Yosef Caro or for the general Jewish populace as well? When there is a contradiction between this work and the Shulchan Aruch, according to which of these works are we to rule?
From the fact that numerous Poskim quote from the Magid Meisharim in their halachic works, it would seem that that at least some of the material was intended for everyone. One famous example concerns eating meat on Rosh Hashanah, which the Magid told Rav Yosef Caro not to do. The Magen Avraham and other poskim bring this down, implying that they felt the halachic material in this work is applicable to the masses. Many other examples this are collected in a series of articles written by Rav Klieres in the Torah journal Tzefunot. However, the Munkatcher Rebbe held that the Magid Meisharim was intended for Rav Yosef Caro alone.
A careful examination of the sefer shows that it also contains many hanhagos, practices that are not mandated by Halacha per se, but are recommended for a righteous person to adopt. Some feel that these pieces were meant for the masses, whereas others are of the opinion that these too were meant only for Rav Yosef Caro to follow. Staying up on Shavuos night could be an example of such an hanhaga. There is no halachic obligation to do so, but, as we have seen, it was widely practiced by righteous people, and sometimes the masses adopt such practices.
However, Rav Yaakov Emden brings from his father, the Chacham Tzvi, that the Magid Meisharim did not influence his halachic rulings in any way. In his siddur, Rav Yaakov Emden writes that it is well-known that the Beis Yosef and Rav Shlomo Alkabetz stayed up Shavuos night and were visited by the voice of the Magid, but that this does not obligate the masses to follow suit.
Based on the above, it becomes understandable why R. Yosef Caro did not cite the custom to stay up on Shavuos night in his halachic works despite knowing very well its importance from his Shavuos night experience with the Magid. As important a practice as it is, in his opinion it was not intended for the broader community.
The principle of Lo BaShamayim Hi and the Magid
In truth, there may well be more to the story of why Rav Yosef Caro did not bring this custom down in his halachic works. The Gemarah in Bava Metzia (59b) sets forth is the principle of "Lo BaShamayim Hi", meaning that the halachic process is not influenced by other-worldly revelations such as a Heavenly voice telling us what to do, or the like. Rav Akiva Yosef Schlesinger uses this axiom to explain why we do not find Rav Yosef Caro bringing anything he learned from the Magid in his Beis Yosef or Shulchan Aruch. This general approach is found by numerous Achronim to dismiss material found in such 'heavenly' works to reach halachic conclusions. To list some: R. Alexander Moshe Lapidus, R. Aron Mi-Pinsk, R' Yitzchack Issac Chaver, and R. Yaakov Emden.
However, the question remains as to why the principle Lo BaShamayim Hi did not prevent various poskim from citing works like that of the Magid in halachic discussions. For example, numerous poskim quote rulings from the Sh’ailos v’Teshuvos Min Hashamayim, in which a rishon collected the responses he received from Heaven in his dreams to questions he had posed before going to sleep.
One possible explanation as to why some poskim cite these works is based on an idea found in the work Seder Mishnah by Rav Zev Wolf Boskovitz. Rav Boskovitz writes that one can rely on such works when their conclusions are not contradicted by anything in Shas.
Other achronim, however, hold that the principle of Lo BaShamayim Hi is applicable under all circumstances and thus, we are not to rely on works like the Magid Meisharim and Sh’ailos v’Teshuvos Min Hashamayim for practical guidance. Perhaps, then, Rav Yosef Caro held a similar position as these achronim and for this reason never quotes the Magid in his halachic works.
The Magen Avraham and the Shavuos night minhag
One final point: According to most of the early sources for this Minhag, it is based on Kabbala and was originally intended only for the most learned of the community, but eventually became the minhag of the masses too. However, it is interesting that the Magan Avraham, after quoting the Zohar as the earliest source for this minhag, gives his own reason for it.
He writes, based on the Midrash, that at Har Sinai, the Jews slept during the night before the giving of the Torah, and Hashem had to awaken them. As a form of teshuvah for our ancestors’ lack of zeal and appreciation for the Torah at Har Sinai, we stay up the entire night learning.The Magen Avraham thus turned a Kabbalastically based custom into one with a basis in the revealed Torah.
Moreover, while most of the sources deal with the special seder of learning one is supposed to follow on Shavuos night, the Magan Avraham does not mention such a seder limud, choosing instead to address various halachic questions that arise for those who stay awake through the night, such as the halachos relating to Netilas Yadyim, Birchas Hatorah, the bracha on the Talis and Kriyas Shema Al Hamitah, thereby further giving a halachic focus to this Kabbalistically rooted minhag. In so doing, the Magen Avraham, a preeminent work on Orach Chaim, may have helped ensure the widespread adoption of the minhag of learning throughout Shavuos night.
 There are many collections of material on this subject. The most in depth treatment is that of R. Binyomin Hamberger, Shorshei Minhag Ashkenaz, 3, pp. 268-364. For additional useful material see : Yosef Yahlom, Alei Eyin, pp. 125-146; R' Mordechai Spielman, Tiferes Tzvi, pp. 74-79; Meir Bar-Ilan, Mechkarei Hachag 8 (1997), pp. 28-48; Moshe Chalamish, HaKabbalah Betefilah Uminhag, pp. 595-612; R' Yakov Hillel, Shut Shorshei Hayam, 2:12; Pardes Eliezer, pp. 70-171; Moadim L’simcha 6, pp. 420-448; Rabbi Yitzchak Tessler, P’ninei Minhag, pp. 120-166. See also Herman Pollack, Jewish Folkways in Germanic Lands (1648-1806), pp. 191-192. For a very interesting article connecting this minhag to the availability of coffeesee Elliott Horowitz, 'Coffee, Coffeehouses, and the Nocturnal Rituals of Early Modern Jewry,' AJS Review 14:1 (Spring 1989), pp. 17-46 and Assaf Nabarro, Tikkun from Lurianic Kabbalah to Popular Culture, PhD dissertation, Ben Gurion University 2006, pp. 87.
 For this see the sources in note one. See also most recently this article from Eli Stern.
 Eliezer Brodt, Halachic Commentaries to the Shulchan Aruch on Orach Chayim from Ashkenaz and Poland in the Seventeenth Century, PhD, Bar Ian University) July 2015, pp.354-360.
 Pauline Wengeroff, Memoirs of a Grandmother, 2010, p.150.
 See Pirkei Zichronos, (2004), p. 359
 Rabbis and Wives, p. 159.
 Letters from the Mir, p. 145
 Mi-Telz Ad Telz, p.212, 362.
 Sefer Hamusar, p. 59a. For information about this work see the introduction to the facsimile edition printed in Jerusalem 1973.
 Or Zarua, p. 233, first printed in its entirety from manuscript in 2009. See Chalamish (above, note 1), pp. 596-597; Eliezer Brodt, Halachic Commentaries to the Shulchan Aruch on Orach Chayim from Ashkenaz and Poland in the Seventeenth Century, pp. 355, fn. 117.
 Mateh Moshe 3:694.
 Zohar, Emor p. 88a
 Mareh Cohen, p. 117, 280. On this work see Zev Gries, Safrut Hanhaghot, pp. 41-42, 71-75.
 Yesh Sachir, p. 33b.
 Seder HaYom, p. 183.
 Siman 494.
 Heichal Hakodesh, p. 60a.
 Magen Avraham, 494: introduction.
 Od LaMoed, p. 33a.
 Sefer Chizyonos, 4:17 (end).
 Ma’agel Tov, p. 66, 154. See my article in Yeshurun 26 (2012), pp. 853-874 for more about this work.
 Sefer HaChida, 2, pp. 534, 538,539,540, 544.
 See his Nefesh Dovid, p. 129 [printed in the back of Seder Eliyhau]. In his work Har Hamoriah, he describes a time when he was ill on Erev Shavuos but that evening felt well enough to stay up and learn [first printed in Shnos Dor Vedor, 1. p.125 and then in Har Hamoriah, p. 59].
 First printed by Simcha Assaf, Kovetz Al Yad 3, p. 131.
 Masos Eretz Yisroel, p.300.
 Sefer Zechirah, p. 258. On this work, see my Likutei Eliezer, pp. 13-25.
 Halichos Teiman, p. 32
 Shelah, Shavuos, pp. 29b-30a. About this letter see: Rabbi Leopold Greenwald, Harav R' Yosef Caro Uz’mano, pp. 197-199; Tzvi Werblowsky, Joseph Karo, Lawyer and Mystic, pp. 19-21, 108-114; A. Ya’ari, Ta’alumot Sefer, p. 106; Y. Tishbi, Chikrei Kabalah UShlucoseha, 2, pp. 391-393; Dovid Tamar, Mechkarim Betoldot Hayehudim B’Eretz Yisroel, pp.195-196; R' Blau, Kulmos, 100 (2011), p.14,29.
 See Chalamish (above note 1), p. 599.
 On this work, see my Likutei Eliezer, p. 2.
 On this subject see my Likutei Eliezer, pp. 90-100. For a new approach to all this see most recently Eliezer Brodt, "The Relationship of the Magen Avraham to the Work Magid Meisharim, Yeshurun 35 (2016), pp. 738-787.
 Tzefunot 6 (1990), pp. 79-86; 8 (1990), pp. 23-31; 9 (1991), pp. 25-33.
 Nimukei Orach Chaim, 426:1.
 See Meir Benayahu, Yosef Bechiri, pp. 396-401; Tzvi Werblowsky, Joseph Karo, Lawyer and Mystic. See also Likutei Eliezer, pp. 100-103.
 This is not found in the Magid Meisharim that we have today. But the Chida has already written that the sefer that is extant today is only a small part of the original work.
 Torat Hakanaot, p. 48a.
 Siddur Rav Yaakov Emden, 2, p. 159.
 For a very useful summary of material about this, see Encyclopedia Talmudis, 33, pp. 869-882. M. Goldstein, The Assistance of Celestial Bodies in Halachic Decisions, (heb.), PhD dissertation, Bar Ilan University 2004.
 Beis Yosef Hachadash, p. 424.
 Toras HaGaon R' Alexander Moshe, p. 328.
 Tosfos Aron, p. 42a.
 Magan Vtzinah, pp. 27b-28a.
 Torat Hakanot, p. 48a.
 About this work, see Rav Aron Marcus’ and Rav Reuven Margolios introductions to their respective editions of Sh’ailos v’Teshuvos Min Hashamayim. See also E. Kanarfogel, "For its not in Heaven: Dreams as a Determinant of Jewish Law and Practice in Northern Europe During the High Middle Ages," Studies in Medieval Jewish Intellectual and Social History (2012) pp. 111-143; Unpublished lecture of Pinchas Roth, "Questions and Answers from Heaven: Halakhic Diversity in a Medieval Community"; Pinchas Roth, "Responsa from Heaven: Fragments of a New Manuscript of "She’elot u-Teshuvot min ha-Shamayim" from Gerona," Materia Giudaica 15-16 (2010-2011) pp. 555-564; Likutei Eliezer, pp.59-63.
 Seder Mishnah, Madah, pp. 113-114.
 See the Radal's notes to Pirkei D’Rabi Eliezer, Perek 41: 41-42.