Another matter: “The Lord saw that the wickedness of man was great on the earth” – it is written: “For all his days are pains, and anger is his concern; even at night his heart does not rest. This too is futility” (Ecclesiastes 2:23). “For all his days are pains” – this is the generation of Enosh and the generation of the Flood, who would pain the Holy One blessed be He with their wicked deeds. “And anger is his concern” – as they would anger the Holy One blessed be He with their wicked deeds.

“Even at night his heart does not rest” – from transgressions. And from where is it derived that [they sinned] during the day as well? The verse states: “And every inclination of the thoughts of his heart was only evil all the day.” Another matter: “Even at night his heart does not rest” – this is the Holy One blessed be He, [who did not rest] from bringing punishment upon them during the day and punishment during the night, as it is written: “He obliterated all existence” (Genesis 7:23).3The proof for this assertion is actually from another verse: “The rain was upon the land forty days and forty nights” (Genesis 7:12) (Matnot Kehunah).

Another matter, “for all his days are pains” – these are the people of Sodom, who would pain the Holy One blessed be He with their wicked deeds. “And anger is his concern” – as they would anger the Holy One blessed be He with their wicked deeds. “Even at night his heart does not rest” – this is the Holy One blessed be He, [who did not rest] from bringing punishment upon them during the day and punishment during the night, that is what is written: “The Lord rained upon Sodom” (Genesis 19:24).4The punishment of Sodom took place at the end of night and the beginning of day (Bereshit Rabba 50:12).

Another matter, “for all his days are pains” – these are the Egyptians, who would pain the Holy One blessed be He with their wicked deeds. “And anger is his concern” – as they would anger the Holy One blessed be He with their wicked deeds. “Even at night his heart does not rest” – when an Israelite would finish his labor [at the end of the day, his Egyptian master] would say to him: Hoe two furrows for me, chop two logs for me.

Another matter: “Even at night his heart does not rest” – this is the Holy One blessed be He, [who did not rest] from bringing punishment upon them during the day and punishment during the night; that is what is written: “It was at midnight” (Exodus 12:29). “This too is futility” (Ecclesiastes 2:23).