You could always try a google search for "attacked on the sea" and "attacked at the sea". The number of hits turns out to be very low. Try "attacked at sea" and you get 162.000 hits. Without dismissing your two sentences as wrong, I would say "at sea" is a safe option.
I'd like to know others' opinions on "on the sea" and "at the sea".