"seaweed," 1590s, from Portuguese sargasso "seaweed," which is perhaps from sarga, a type of grape (on this theory, the sea plant was so called from its berry-like air sacs; it also is known as grapeweed), or from Latin sargus, a kind of fish found in the Mediterranean and eastern Atlantic, from Greek sargos, name of a sea-fish that appears in schools, a word of uncertain origin.
The name Sargasso Sea is attested by 1819 for the large section of the Atlantic in the interior of the great loop of the Gulf Stream, where this sort of weed abounds and could impede sailing ships. Hence figurative for any sort of stagnant mass.