Commentary for Berakhot 113:4
הבא על אמו בחלום יצפה לבינה שנאמר (משלי ב, ג) כי אם לבינה תקרא הבא על נערה מאורסה יצפה לתורה שנאמר (דברים לג, ד) תורה צוה לנו משה מורשה קהלת יעקב אל תקרי מורשה אלא מאורשה הבא על אחותו בחלום יצפה לחכמה שנאמר (משלי ז, ד) אמור לחכמה אחותי את הבא על אשת איש בחלום מובטח לו שהוא בן העולם הבא וה"מ דלא ידע לה ולא הרהר בה מאורתא
Who dreams of having intercourse with his mother may hope for understanding; as it is said, "Yea, thou wilt call understanding 'mother'" (Prov. ii. 3). [Who dreams] of having intercourse with a betrothed maiden may hope for Torah, as it is said, "Moses commanded us a law [Torah], an inheritance of the congregation of Jacob" (Deut. xxxiii. 4) — read not morashah "an inheritance" but me'orasah "betrothed maiden." Who dreams of having had intercourse with his sister may hope for wisdom ; as it is said, "Say unto wisdom, thou art my sister" (Prov. vii. 4). Who dreams of having had intercourse with a married woman is assured that he is a son of the world to come ; but this applies only if he was not acquainted with her and did not think of her during the evening.