"Tremble and sin not; speak in your heart upon your bed, and be still" (Psalms 4:5). Rabbi Yaakov bar Avina and the Rabbis. Rabbi Yaakov bar Avina said: enrage your evil inclination so that it not lead you to sin. And the Rabbis said: provoke your evil inclination to anger so that you not come to sin. It was taught in the name of Rabbi Eleazar: "The hope of Israel" (Jeremiah 17:13). The Holy One, blessed be He, said to Israel: I told you that you should pray in the synagogue that is in your city; and if you cannot, pray in your field; and if you cannot, pray within your house; and if you cannot, pray upon your bed; and if you cannot, meditate in your heart -- "speak in your heart upon your bed, and be still" (Psalms 4:5). Rabbi Yudan said: be still from that transgression which is in your hand. Therefore Hosea warns Israel and says to them, "Return, O Israel" (Hosea 14:2).
Tremble and Sin Not and Pray Even Upon Your Bed
Pesikta DeRav Kahana 24:4
[ד] רגזו ואל תחטאו אמרו בלבבכם ועל משכבכם וגו' (תהלים ד:ה). ר' יעקב בר אבינה ורבנין. ר' יעקב בר אבינה אמ' ארגז יצרך ואל יחטיאך, ורבנין אמרין אכעיס יצרך ואל תבא לידי חט. תני בשם ר' לעזר מקוה ישראל (ירמיה יז:יג), א' הקב"ה לישר' אני אמרתי לך שתהא מתפלל בבית הכנסת שיש בעירך, ואם אין את יכול התפלל בתוך שדך, ואם אין את יכול התפלל בתוך ביתך, ואם אין את יכול התפלל על מיטתך, ואם אין את יכול הרהר בליבך, אמרו בלבבכם על משכבכם וג' (תהלים שם). א"ר יודן דום מאותה העבירה שיש בידך. לפיכך הושע מזהיר את ישר' ואו' להם שובה ישראל (הושע יד:ב).