In the heyday of sailing ships, all war ships and many freighters carried iron cannons. Those cannon fired
round iron cannon balls. It was necessary to keep a good supply near the cannon.
But how to prevent them from rolling about the deck? The best storage method devised was a square based
pyramid with one ball on top, resting on four resting on nine which rested on sixteen.
Thus, a supply of 30 cannon balls could be stacked in a small area right next to the cannon.
There was only one problem -- how to prevent the bottom layer from sliding/rolling from under the others.
The solution was a metal plate called a "Monkey" with 16 round indentations. But if this plate was made of iron, the iron balls would
quickly rust to it. The solution to the rusting problem was to make "Brass Monkeys." Few landlubbers realize that brass contracts much more and much faster than iron when chilled.
Consequently, when the temperature dropped too far, the brass indentations would shrink so much that the iron cannon balls would come right off the monkey. Thus, it was quite literally, "Cold enough to freeze the balls off a brass monkey!" (And all this time, you thought that was an improper expression, didn't you?)

^^^^ ^^^^^ ^^^^^ Edited the above for readability ^^^^ ^^^^ ^^^^
Sorry matie' that don't hold water arrrrr.
1) Warships don't store cannonballs (or Roundshot) on deck around the clock, day after day on the chance they may go into battle. Space was precious commodity on a sailing ship and decks were kept clear as possible in order to allow room for hundreds of men to prefprm all the tasks necessary for ordinary ships function.
Stacking round shot on deck would also create the danger of their breaking free and rolling lose on deck whenever the ship hit rough seas. Cannonballs were stored elsewhere and only brought out when the decks had been cleared for action.
2) Particularly dilligent gunners would have their crews chip away imperfections on the surface of cannonballs to make them as smoth as possible, in the hopes that they would fly truer. They did not leave shot on deck exposed to the elements where they would rust.
3) When references to "Brass Monkeys" started appearing in prit in the mid 19th century they did not allways mention balls or cold temperature. It was sometimes cold enough to freeze the ears, tail, nose or wiskers off a brass monkey.
Likewise it was sometimes hot wnough to scald the throat or singe the hair off a brass monkey.
Taken from the snopes site.... which I tend to believe much more then some brass ball catcher thingie.....