In One Piece Chapter 254, Usopp saw someone that fix Going Merry, later in chapter 351, Franky told him that it actually a manifestation of a ship's soul.
Is this based on any real legend?
Yes it is, Klabautermann in One Piece world described as a marine holding an hammer, the real story about Klabautermann is a small sailor in yellow with a tobacco pipe and woolen sailor's cap, and often wearing a caulking hammer. (source)
Klabautermann from German folklore (left) and Klabautermann from One Piece world (right)
When Usopp first meeting with Klabautermann, he was fixing Going Merry and revert it to its original shape, not to the flying model when Going Merry got damaged.
Usopp saw Merry's spirit when it was already heavily damage, and the boat was beyond repair.