In Dead Wake: The Last Crossing of the Lusitania, Erik Larson discusses the early history of the submarine. According to Larson, the submarine was regarded as an "iron coffin" until the work of John Philip Holland, an Irish engineer.
Larson says (page 57): "A famous 1898 cartoon, based on a photograph....shows Holland emerging in top hat [actually it may have been a derby] from the hatch of one of his submarines with the caption "What, me worry?" For the photograph on which the cartoon may have been based, see Wikipedia, John Philip Holland
I have not been able to find the cartoon; nor have I been able to find if the phrase was in use before 1898, or if it originated in the cartoon.
(See also Richard Compton-Hall The Submarine Pioneers: The Beginnings of Underwater Warfare, Chapter Three.))