IMO, in that context, in Revelation 13, the sea is maybe meaning the bottomless pit.
Revelation 13:1 And I stood upon the sand of the sea, and saw a beast rise up(anabaino) out of the sea, having seven heads and ten horns, and upon his horns ten crowns, and upon his heads the name of blasphemy.
Revelation 17:3 So he carried me away in the spirit into the wilderness: and I saw a woman sit upon a scarlet coloured beast, full of names of blasphemy, having seven heads and ten horns.
having seven heads and ten horns---and upon his heads the name of blasphemy(Revelation 13:1)---full of names of blasphemy, having seven heads and ten horns(Revelation 17:3)
Revelation 17:8 The beast that thou sawest was, and is not; and shall ascend(anabaino) out of the bottomless pit, and go into perdition: and they that dwell on the earth shall wonder, whose names were not written in the book of life from the foundation of the world, when they behold the beast that was, and is not, and yet is.
was = initially was not in the bottomless pit
and is not = eventually got cast into the pit sometime prior to John seeing these visions, thus currently in the pit when John saw these visions
and shall ascend out of the bottomless pit = meaning a time future to John seeing these visions, the beast will be released from the pit, where it seems that that could be meaning Revelation 13:1 showing it's release from the pit.
This raises even more questions, assuming I'm correct about any of this. One question being, what is the bottomless pit?