Both are possible. If someone is "at sea", I expect that person to be onboard a vessel travelling on the ocean. The vessel is not parked to a port, but other than that the sentence does not convey whether he is close to shore.
If someone is "in the sea", I'd expect him to be inside a submarine... (or perhaps diving / swimming).