"The land rests" as long as sin rests. But the land is said to be moved—that is, those who dwell in the land—when sins have begun to move and disturb the souls of men. And this is why what the present reading now contains has been written. "And the land rested," it says, "for forty years. And the children of Israel did what was evil in the sight of the Lord, and the Lord delivered them into the hands of Midian for seven years. And Midian prevailed over Israel." So then, as long as there was righteousness in the land—that is, in those who dwelt in the land—"the land" is said "to have rested"; b...ut when iniquity increased and "they did evil in the sight of the Lord," then, it says, "the Lord delivered them into the hands of Midian for seven years." Nor are the Midianites said to have prevailed over the people of the Lord as long as the people kept the Lord's precepts. But when it began to neglect the divine commandments, the hand of the enemy became stronger and mightier against it. And against that former people bodily enemies rose up when it had transgressed; but against us, who are called Israel according to the spirit, a spiritual enemy without doubt rises up, and when we neglect the commandments of God, when we despise the precepts of Christ, the hand of demons is made mightier against us, and we too are handed over to our enemies when we are deserted by grace.
Source: HOMILIES ON JUDGES 7