The mermaids represent the world of the imagination, which is a contrast to the sordid world of London described in the early lines of the poem, as well as to the dull party (like countless others) that Prufrock is attending.
However, before we get to the final stanza, Prufrock has this to say about the mermaids in the two preceding stanzas. In the third-to-last stanza, he says,
I have heard the mermaids singing, each to each.
I do not think that they will sing to me.
I have seen them riding seaward on the wavesCombing the white hair of the waves blown backWhen the wind blows the water white and black.We have lingered in the chambers of the seaBy sea-girls wreathed with seaweed red and brownTill human voices wake us, and we drown.
Mermaids, creatures of mythical lore and romance, represent escape and freedom for the dreamy, shy, insecure Prufrock. We see earlier in the poem how bored and dissatisfied he is with the reality of his life in a stifling modern urban environment, addressing his disconnected thoughts to someone never identified (but most likely himself).
Therefore Prufrock conjures up an imagined scene complete with people who are more congenial companions than the humans of his actual everyday world. The allure of the imagined mermaids is implicitly contrasted with the tedious women who sit around at teatime making small talk about art and such-like subjects and making socially awkward individuals like Prufrock the target for their criticism, causing him to worry about his appearance.
[They will say: "How his hair is growing thin!"]
My morning coat, my collar mounting firmly to the chin,
My necktie rich and modest, but asserted by a simple pin—
[They will say: "But how his arms and legs are thin!"] (41-44)
Prufrock’s preferred element would appear to be the powerful and mysterious world of the sea, rather than the modern city. Earlier, he breaks off from his rambling descriptions of city life with the striking observation that he should merely have been ‘a pair of ragged claws/scuttling across the floor of silent seas’(73-74). It seems he feels he might have done better as some sort of lowly creature at the very bottom of the ocean, rather than as a man, a supposedly advanced being. It is the modern urban world in which he feels he cannot stay afloat.