1650s, "mop made of rope or yarn," from swabber (c. 1600) "mop for cleaning a ship's deck," from Dutch zwabber, akin to West Frisian swabber "mop," from Proto-Germanic *swabb-, perhaps of imitative origin, denoting back-and-forth motion, especially in liquid.
Non-nautical meaning "anything used for mopping up" is from 1787; as "cloth or sponge on a handle to cleanse the mouth, etc.," from 1854. Slang meaning "a sailor" first attested 1798, short for swabber "member of a ship's crew assigned to swab decks" (1590s), which by c. 1600 was being used in a broader sense of "one who behaves like a low-ranking sailor, one fit only to use a swab."