This is an old folk song sung at summer camps across the country and usually taken as a mostly meaningless bit of rhyme. Though it's impossible to determine exactly what the origins of the lyrics are (many of these songs have verses that come after one another mostly non sequitor, sometimes making diametrically opposed points, suggesting that they were cobbled together over time, not written all at once), an interesting possiblity presents itself:

Two of the first ironclads ever built were the U.S.S. Monitor and the C.S.S. Virginia, fighting for opposite sides in the American Civil War. In 1862, they met in a historic battle (a stalemate) that marked the end of wooden ocean combat. The Virginia had been built upon the partially burned hull of the U.S.S. Merrimack, a northern frigate salvaged from a mostly-burned harbor when Virginia seceeded from the Union, and though rechristened, she went down in history, for whatever reason, under her former name.

The Merrimack, former wooden hull covered in metal, was black in color. Being an ironclad, she had metallic rivets all along her hull to hold her together.

The song is typically sung aloud and passed on through memorization, not written down. Is it possible that the words to the first verse are really

Miss Merrimack, mack, mack,
All dressed in black, black, black,
With silver buttons, buttons, buttons
All down her back, back, back.


Maylith says:
That was an old jumprope rhyme when I was in grade school. And it was also a .... clapping song. (I forget the proper term for it, but it involved complicated clapping with a partner.)