The Maharam Me’Rutenberg (Germany, d. 1293), in one of his responsa, addresses the situation where ten men are present in the synagogue, but one is praying the Amida, such that he cannot respond to Barechu, Kaddish, Nakdishach, or the Hazzan’s repetition of the Amida. The question arises as to whether he may be counted for a Minyan to allow these prayers – which require a Minyan – to be recited. The Maharam ruled that if ten men are present, then Hashem is present, too, even if one of them is praying the Amida, and so all sections of the prayer service may be recited, as this is considered a legitimate Minyan.
The Mahari Berab (Rav Yaakob Berab, 1474-1546), the mentor of the Maran, author of the Shulhan Aruch, applied this ruling of the Maharam Me’Rutenberg to a case where one of the ten men in the synagogue is sleeping. Just like a person praying the Amida, who is unable to participate in the responses, nevertheless counts towards the Minyan, similarly, one who is unable to participate because he is asleep nevertheless counts as the tenth man in the Minyan. Maran brings this ruling both in his Bet Yosef and in the Shulhan Aruch (Orah Haim 55).
Others, however, disagree with this position. The Taz (Rav David Ha’levi Segal, 1586-1667) argues that unlike a sleeping person, one who recites the Amida can listen attentively to what is being recited. Through the principle of "Shome’a Ka’oneh," he can be considered as though he recites the prayer, even though he is in the middle of the Amida. One who sleeps, however, is not even thinking about the words, and so he cannot count as a member of the Minyan. The Aruch Ha’shulhan (Rav Yechiel Michel Epstein of Nevarduk, 1829-1908) advances a different argument, asserting that while one sleeps, he is considered, in a sense, dead. Indeed, upon awakening each morning we recite the Beracha, "Ha’mahazir Neshamot Li’fgarim Metim" – "who restores the souls to the dead corpses," thanking Hashem for restoring our lives after our period of "death" when we slept. For this reason, the Aruch Ha’shulhan contends, a sleeping person cannot be counted toward a Minyan. Yet a third reason for disputing the Mahari Berab’s position is postulated by the Shulhan Aruch Ha’Rav (Rav Schnuer Zalman of Liadi, 1745-1813), who writes that while sleeping, a person does not have the level of Kedusha (sanctity) that is required to be considered part of a Minyan.
More importantly for us, a number of prominent Sephardic authorities also argued on the Mahari Berab’s position – the Peri Hadash (Rav Hizkiya Da Silva, 1659-1698), and the Hid"a (Rav Haim Yosef David Azulai, 1724-1806) in Birkeh Yosef. The Ben Ish Hai (Rav Yosef Haim of Baghdad, 1833-1909), too, in Parashat Vayehi, rules that a sleeping person cannot be counted towards a Minyan.
The Hafetz Haim (Rav Yisrael Meir Kagan of Radin, 1839-1933), in his Bi’ur Halacha (essays accompanying the Mishna Berura), suggests a compromise of sorts between these two opinions. He concludes that in such a case, where the tenth man is asleep, the congregants should try to wake him. If he does not wake up, then he can be counted with respect to the recitation of Kaddish, Nakdishach and Barechu, but not with respect to Berachot – meaning, the Hazzan’s repetition of the Amida – given the risk of these Berachot being considered as having been recited in vain.
Regardless, Hacham Ovadia Yosef, both in Yehaveh Da’at and in Halichot Olam, writes that we accept the Shulhan Aruch’s ruling. The Shulhan Aruch clearly received this Halacha from his mentor, the Mahari Berab, and he ruled accordingly, such that we have no reason not to follow this opinion. Therefore, if ten people are assembled in the synagogue, and one of them is sleeping, this is considered a valid Minyan with respect to all parts of the prayer service requiring a Minyan. However, Hacham David Yosef, in his Halacha Berura, writes that it is preferable to first try waking the fellow who is sleeping.
The Mishna Berura, in discussing the stringent opinion, explains that since a person’s mental faculties do not function when he sleeps, a sleeping person has the status of Shoteh – a mentally impaired individual, who cannot be counted for a Minyan.
However, one might counter this claim in light of the Gemara’s discussion in Masechet Gittin (70) concerning the case of a person who instructs somebody to deliver a Get to his wife, and is then overcome by "Kurdaykus" –a kind of spirit that could overtake a person after drinking wine from a barrel. If in this state he then tells the person not to deliver the Get to his wife, this second instruction is ignored, since it was given when this person did not have control over his mental faculties. The Gemara cites two views as to whether this means that the agent may deliver the Get immediately, or if the Get may not be given until the husband recovers from this condition of incapacitation. According to one view, the Gemara explains, the man in this state is considered a Shoteh, and since a Shoteh cannot divorce his wife, because he is not mentally functional, the Get cannot be delivered while the husband experiences this condition of "Kurdaykus." According to another view, however, the man in this condition is considered like he’s asleep, and therefore, just like a messenger may deliver a Get while the husband is asleep, in this case, too, the Get may be delivered while the husband is overcome by "Kurdaykus."
What is significant for our purposes is the fact that the Gemara clearly viewed sleep and mental incapacity as two distinct experiences. The debate in the Gemara is whether a person overcome by "Kurdaykus" has the status of a Shoteh or the status of a sleeping person – clearly indicating that these two statuses are not the same. Therefore, we may question the Mishna Berura’s assertion that a sleeping man cannot be counted for a Minyan because he is similar to a Shoteh.
In any event, as mentioned, we accept the Shulhan Aruch’s lenient ruling, that a sleeping person may be counted as the tenth man of a Minyan.
This applies regardless of whether the person is briefly dozing in his chair, or lying down on a bench. With regard to the laws of Berachot at a meal, we find a distinction between these two types of sleep. If one briefly dozes at the table, he does not have to recite Berachot anew over the food if he wishes to resume eating after he wakes up. If, however, he left the table and took a nap on a couch or bed, then he must recite Berachot when he wakes up. A real nap – as opposed to just a doze – constitutes "Heseh Ha’da’at," mentally withdrawing from the meal, such that new Berachot are required afterward. When it comes to a Minyan, however, this distinction is immaterial. This is the ruling of Hacham Ovadia Yosef.
It should be noted that from the Shulhan Aruch’s formulation it appears that only one of the ten men may be sleeping. If ten people are present and two or more of them are asleep, this does not qualify as a Minyan.
Interestingly, this Halacha would not apply in the case of a person who was placed under hypnosis. Such a person indeed loses all control of his mental faculties, as he would do anything he is told to do under such a state, such that he falls under the category of Shoteh. And unlike someone who sleeps, a person under hypnosis cannot wake up on his own, and requires somebody else to bring him out of his hypnotic trance. Therefore, he would not count towards a Minyan.
Finally, it should be mentioned that Rav Shlomo Zalman Auerbach (Jerusalem, 1910-1995) ruled that technically speaking, somebody who is asleep does not need to be woken so he could pray or recite Shema before the final time. There is Halachic principle that "Yashen Patur Min Ha’misvot" – a person is exempt from Misva obligation while he sleeps, and thus there is no need to wake up somebody so he could fulfill Misvot such as Shema and prayer. Likewise, Rav Shlomo Zalman ruled, if somebody fell asleep indoors on Sukkot, he does not need to be awakened so he could go sleep in the Sukka. The obligation to sleep in the Sukka requires going into the Sukka to sleep; once one has fallen asleep outside the Sukka, he is exempt from Misvot and thus does not have to be wakened. In fact, Rav Shlomo Zalman ruled that after one falls asleep in a Sukka, others may, strictly speaking, carry his bed outside the Sukka without waking him, as he is not obligated in Misvot at that point.
In practice, however, Rav Shlomo Zalman writes that it is proper to try to wake somebody up to fulfill Misvot so that he could earn the great merits and rewards that each Misva offers.
Summary: According to the ruling of Hacham Ovadia Yosef, if ten people are present in the synagogue but one of them is sleeping, he may nevertheless be counted as the tenth men. It is preferable, however, to first try to wake him. If two or more of the ten men are sleeping, this does not qualify as a Minyan.