Origin

Mid 19th century: often said to be from a type of brass rack or 'monkey' in which cannonballs were stored and which contracted in very cold weather, ejecting the balls, but this explanation has not been proved.