Judges 6:7

And it came to pass, when the children of Israel cried unto the LORD because of the Midianites,

The cry because of the Midianites came after seven years of their oppression, which followed Israel doing evil and the withdrawal of God's protecting hand. The Midianites with their desert allies swarmed into the land as soon as the harvests ripened. They stripped the fields and robbed the people of their produce. Those dwelling in the open country were forced to flee for safety into walled towns, fortresses, caves and rocky strongholds.

The cry to the Lord in that distress meant giving heed to His reproof and confessing their sins. In answer to that penitent cry God again raised up a helper to deliver Israel from its oppressors.