Thanks for posting the reference. So this is Bridgwater Street, Liverpool, and there are many seamen. The first person listed in the household is a Tailor. The mariners may have been lodging with him between voyages.
M Mariner is not an official abbreviation for 1841, where capital M is officially a manufacturer, and lower-case m is a maker. But many enumerators didn’t follow instructions, making up their own abbreviations for occupations commonly found in their own districts.
I reckon these men were being recorded as merchant mariners. There was no certification for masters before 1845, but a true master mariner needed many years’ sea experience to be in charge of a vessel.