The answer to your question rests (pun intended) in the lesser-known second stanza of the famous song/poem "The Star-Spangled Banner":
On The Shore, Dimly Seen Through The Mists Of The Deep,
Where The Foe's Haughty Host In Dread Silence Reposes,
What Is That Which The Breeze, O'er The Towering Steep,
As It Fitfully Blows, Now Conceals, Now Discloses?
The verb "to repose" simply means "to rest." You can see here it is the enemy's "haughty host" that rests or "reposes" in the eerie silence. The enemy, then, was resting in the cover of mist from the ocean. It is the breeze that blows which reveals the enemy from its resting place.
It's important to note, however, that the fort (and the flag) in question are not in the ocean, ... they are on land. It was Francis Scott Key that was aboard ship watching the fort through the mist of the ocean. The history of the song reveals this fact. (See the link to the eNotes page below.)
It's encouraging that these questions cause you to delve deeper into this wonderful historical poem and song than just our usual first verse. It's quite a mind-expanding exercise to explore the poem further and learn a little bit about the war and, in fact, the battle that is so beautifully written about here.