"Now Hannah, she spoke in her heart" (1 Samuel 1:13). It is written, "to love the LORD your God and to serve Him with all your heart" (Deuteronomy 11:13). But is there a service that is in the heart? And which is this? This is prayer. And likewise, "your God whom you serve continually" (Daniel 6:17) — but is there worship in Babylon? And which is this? This is prayer. One might think that a person may pray toward any direction he wishes; therefore it is made explicit regarding Daniel, "and his windows were open in his upper chamber toward Jerusalem" (Daniel 6:11). One might think that a person may pray those three [prayers] at any hour he wishes; therefore it is made explicit regarding Daniel, "and three times a day he knelt upon his knees" (Daniel 6:11). One might think that [only] from the time he came to Babylon [did he do so]; the verse teaches, "as he did aforetime" (Daniel 6:11). One might think that a person may pray the three of them as one; therefore it is made explicit regarding David, "evening, and morning, and at noon, will I pray, and moan" etc. (Psalms 55:18). One might think that a person may raise his voice in his prayer; therefore it is made explicit regarding Hannah, "Now Hannah, she spoke in her heart." One might think that he should meditate in the heart [silently]; the verse teaches, "only her lips moved, but her voice was not heard; therefore Eli thought her to be drunk" — from here that a drunkard is forbidden to pray. And what is its reason? As it is said, "Therefore hear now this, you afflicted, and drunk, but not with wine" (Isaiah 51:21). Rabbi Zerika and Rabbi Yochanan and Rabbi Eliezer the son of Rabbi Yose the Galilean, they say: one in distress is forbidden to render a [legal] ruling. And it is reasoned only from this verse, "Therefore hear now this" etc. Abba bar Rav Huna said: one who has imbibed should not pray, and if he prayed, his prayer is [accepted as] supplications; a drunkard should not pray, and if he prayed, his prayer is blasphemies. Which is one who has imbibed and which is a drunkard? One who has imbibed — less than a quarter [-log]; a drunkard — a quarter [-log]. There they say: anyone who is unable to speak with the king.
Hannah's Silent Prayer Teaches the Laws of How to Pray
Midrash Shmuel 2:10
וחנה היא מדברת על לבה (שמואל א' א' י"ג). כתיב לאהבה את ה' אלהיכם ולעבדו בכל לבבכם (דברים י"א י"ג), וכי יש עבודה בלב, ואי זו זו תפלה, ודכותה אלהך די אנת פלח ליה בתדירא (דניאל ו' י"ז), וכי יש פולחן בבבל, ואי זו זו תפלה, יכול יהא אדם מתפלל לכל רוח שירצה, פירש בדניאל וכוין פתיחן ליה בעליתיה נגד ירושלם (שם שם י"א), יכול יהא אדם מתפלל [שלשתן] בכל שעה שירצה, פירש בדניאל וזמנין תלתא ביומא (הוה) [הוא] בריך על ברכוהי (שם שם), יכול מכיון שבא לבבל, ת"ל כל קבל דהוה עביד מן קדמת דנא (שם שם), יכול יהא אדם מתפלל שלשתן כאחת, פירש בדוד ערב ובקר וצהרים אשיחה ואהמה וגו' (תהלים נ"ה י"ח), יכול יהא אדם מגביה קולו בתפלתו, פירש בחנה וחנה היא מדברת על לבה, יכול יהא מהרהר בלב, ת"ל רק שפתיה נעות וקולה לא ישמע, ויחשבה עלי לשכורה, מכאן שהשכור אסור להתפלל, ומה טעמיה, שנאמר לכן שמעי נא זאת עניה ושכרת ולא מיין (ישעי' נ"א כ"א), רבי זריקא ורבי יוחנן ורבי אליעזר בנו של רבי יוסי הגלילי, אמרין המצר אסור להורות, ולא מסתברא אלא מן הדא קרא לכן שמעי נא זאת וגו'. אבא בר רב הונא אמר שתוי אל יתפלל, ואם התפלל תפלתו תחנונים, שכור אל יתפלל, ואם התפלל תפלתו גדופים אי זהו שתוי ואי זהו שכור, שתוי פחות מרביעית, שכור רביעית, תמן אמרין כל שאינו יכול לדבר עם המלך.