The book of Ecclesiastes, or Kohelet, certainly grapples with that feeling. It can feel bleak, right? But within that perceived bleakness, ancient interpreters found profound meaning. Take this verse: "For all his days are pains, and his occupation is anger; even at night his heart does not rest. This, too, is vanity" (Ecclesiastes 2:23). Sounds pretty grim, doesn't it? But what if it's not just about one person, but about entire generations?

The Kohelet Rabbah, a rabbinic commentary on Ecclesiastes, offers some fascinating interpretations. It suggests that this verse isn't just a lament, but a reflection on the consequences of collective wrongdoing.

First, the Kohelet Rabbah connects this verse to the generation of the Flood. "For all his days are pains" – this, we're told, refers to that generation who "pained the Holy One, blessed be He, with their wicked deeds." Their "occupation is anger" because they angered God with their very actions, their "handiwork." And "even at night his heart does not rest" from sins. The commentary even pulls in Genesis 6:5 – "And every inclination of his heart’s thoughts was only bad all day long" – to emphasize that this wickedness was constant. It permeated everything. And God’s punishment? It came day and night: "The rain was upon the earth forty days and forty nights" (Genesis 7:12). The punishment mirrored the sin – relentless and inescapable.

But there's another layer here. "Even at night his heart does not rest" could also refer to God! God, in a sense, couldn't rest easy knowing what He had to do – bring punishment upon them. "He obliterated all existence" (Genesis 7:23), the verse tells us. A difficult, painful decision.

The Kohelet Rabbah doesn't stop there. It draws parallels to the people of Sodom. Again, "For all his days are pains" – these are the Sodomites, who pained God with their wickedness. "And his occupation is anger" – they angered God with their actions. And the punishment? It came "at the end of the night into the morning," as it is stated: "The Lord rained upon Sodom and upon Gomorrah…" (Genesis 19:24). Once again, the idea of unrelenting consequences.

And yet a third interpretation? The Egyptians. "For all his days are pains" – the Egyptians, who pained God with their wicked deeds. "And his occupation is anger" – they angered God with their handiwork, with their oppression. The commentary gives a very human, relatable example here: even when an Israelite finished their grueling labor, the Egyptian would demand more: “Hoe me two furrows, chop me two logs.” There was no rest, no escape from their torment. "Even at night his heart does not rest."

And once more, this lack of rest applies to God as well. God decided to bring punishment upon them day and night, culminating in the slaying of the firstborn at midnight (Exodus 12:29), followed by the Exodus during the day. It was a complete and total reckoning.

What are we to make of all this? Is it just a historical recounting of divine punishments? Or is there something deeper? Perhaps the Kohelet Rabbah is reminding us that actions, especially collective actions, have consequences that ripple through time. They affect not only the perpetrators but also, in a profound way, the Divine. Maybe the “vanity” Kohelet speaks of isn’t just about individual pursuits, but also about the futility of thinking we can escape the weight of our choices, both as individuals and as societies. It's a sobering thought, isn't it? One that asks us to consider what kind of legacy we're building, day and night.