You might say the latter to imply...
"I used to swim in the sea in my childhood (but now I don't anymore)."
Here, the は is functioning as the contrastive particle (対比の「は」).
You might also say the latter when responding to a question...
"What did you often do in your childhood?"
-- "In my childhood, I often swam in the sea."
Here, the は is functioning as the topic particle (主題の「は」).
You'd say the former to just neutrally state that you would often swim in the sea in your childhood.