“You and your wife and your sons and your sons’ wives” – Rabbi Yudan ben Rabbi Simon and Rabbi Yoḥanan in the name of Rabbi Shmuel bar Yitzḥak: When Noah entered the ark, it was prohibited to him to engage in procreation. That is what is written: “You shall come to the ark: You and your sons” (Genesis 6:18) – by yourselves; “and your wife and your sons' wives” (Genesis 6:18) – by themselves.10Men and women separately.
When he emerged, He permitted it for him. That is what is written: “Go out of the ark: You and your wife, [and your sons and your sons’ wives].”11Man and wife together. Rabbi Aivu said: “They are in want and in famine, they are solitary” (Job 30:3) – if you see want come to the world, and famine come to the world, “they are solitary [galmud]” – consider your wife as though she is galmuda [a menstruating woman].12There are places where they call a menstruating woman galmuda (see Bereshit Rabba 31:12).
The verse is teaching: Do not engage in marital relations as long as a catastrophic situation is taking place. Rabbi Huna said: It is written: “Two sons were born to Joseph” (Genesis 41:50). When? “Before the advent of the year of the famine” (Genesis 41:50).13Showing that during times of catastrophe, marital relations should be avoided.