Perhaps you would like to click here and look at the second paragraph of the answer.
The leadsman would call out the depth. If it was exactly on one of the markers he would call, "By the mark xxx". "Twain" is an old word for "two", so it looks like a report of a depth of two fathoms (twelve feet). I hope he was in a small ship. That's not enough depth for a larger ship!
Mark Twain the writer took it as his pseudonym because he'd heard it used on Mississipi paddle steamers -- for which I guess two fathoms would be easily passable. (Can't remember his real name though...).
Wasn't there a TV character in the 80s called Max Headroom? Much the same idea.