"I sleep, but my heart is awake" (Song of Songs 5:2). For the Congregation of Israel said before the Holy One, blessed be He: Master of the worlds, I sleep away from the Temple, but my heart is awake in the synagogues and in the houses of study. I sleep away from the offerings, but my heart is awake in the commandments and in acts of righteousness. I sleep away from the commandments, but my heart is awake to perform them. I sleep away from the appointed end, but my heart is awake for the redemption. I sleep away from the redemption, but my heart is awake toward the Holy One, blessed be He, until He redeems me. Rabbi Hiyya bar Abba said: Where do we find that the Holy One, blessed be He, is called the heart of Israel? From this verse: "God is the Rock of my heart and my portion forever" (Psalms 73:26). "The voice of my beloved knocks" (Song of Songs 5:2) — this is Moses, as it is said, "And Moses said: Thus says the LORD: About midnight" (Exodus 11:4). "Open to me" (Song of Songs 5:2) — Rabbi Yose said: The Holy One, blessed be He, said: Open to me an opening like the eye of a needle, and I will open for you an opening through which tents and turrets may enter. "My sister" (Song of Songs 5:2) — in Egypt, where they were joined to Me through two commandments: through the blood of the Passover and through the blood of circumcision. "My friend" (ibid.) — they were made beloved to Him at the Sea, and they said, "The LORD shall reign for ever and ever" (Exodus 15:18). "My dove" (Song of Songs 5:2) — at Marah, where I was commanded like a dove through commandments. "My perfect one" (Song of Songs 5:2) — for they were made whole for Me at Sinai, and they said, "All that the LORD has spoken we will do and obey" (Exodus 24:7). "For my head is filled with dew" (Song of Songs 5:2) — as it is said, "Indeed, the heavens dripped" (Judges 5:4).
I Sleep but My Heart Is Awake - Israel's Longing for Redemption
Midrash Tanchuma Buber, Toldot 18:1
אני ישנה ולבי ער (שה"ש ה ב). שאמרה כנסת ישראל לפני הקב"ה, רבון העולמים אני ישנה מבית המקדש, ולבי ער בבתי כנסיות ובבתי מדרשות. אני ישנה מן הקרבנות, ולבי ער במצות ובצדקות. אני ישנה מן המצות, ולבי ער לעשותם. אני ישנה מן הקץ, ולבי ער לגאולה. אני ישנה מן הגאולה, ולבי ער להקב"ה (עד) שיגאלני. אמר ר' חייא בר אבא (היאך) [היכן] מצינו שנקרא הקב"ה לבן של ישראל, מן המקרא הזה צור לבבי וחלקי אלהים לעולם (תהלים עג כו). קול דודי דופק (שה"ש שם), זה משה, שנאמר ויאמר משה כה אמר ה' כחצות הלילה (שמות יא ד). פתחי לי (שה"ש שם), אמר ר' יוסי אמר הקב"ה פתחי לי פתח כחודה של מחט, ואני פותח לך [פתח] שיהו אוהלות (ובצור צירות) [וכצוצריות] נכנסין בו. אחותי (שה"ש שם), במצרים שנתאחו לי בשתי מצות, בדם פסח ובדם מילה. רעיתי (שם), נתרעו לו בים, ואמרו ה' ימלוך לעולם ועד (שמות טו יח), יונתי (שה"ש שם) במרה שנצטויתי לי כיונה במצות, תמתי (שה"ש שם), שנתמו לי בסיני ואמרו כל אשר דבר ה' נעשה ונשמע (שמות כד ז). שראשי נמלא טל (שה"ש שם) [שנאמר] אף שמים נטפו (שופטים ה ד)