Bible researchers tell us there were five men in the bible named Asaph. It appears from the context of this psalm it may have been written when Hezekiah was king of Judah.
In 2 Kings 19 and 2 Chronicles 32, we find the city of Jerusalem surrounded by the Assyrian army. Sennacherib sent a letter to the people of Jerusalem that the army commander loudly read before the city walls. That letter proclaimed his previous victories and belittled the God of the Jews. That night an angel went through the camp killing the vast majority of the 185,000 soldiers; only a few remained alive to escape to the king forcing Sennacherib to retreat to his homeland. Sennacherib was then killed by two of his sons.
Is it any wonder that Asaph breaks out in praise? Hezekiah had sent messengers to ask Isaiah about the problem; Isaiah replied not to worry because God would handle the problem. Shouldn’t we expect God to do the same type of miracles today?