Essentially maybe Nando, but you went on to describe it I just searched for the
word origin. Yes, the first deck over the ballast which actually ties into our subject of the 'heads'.
This was where a sailor who found it too dangerous to risk being swept off the heads by a sea often retired to in severe weather and the effluence wound up in the bilge.
Imagine a three decker with a few hundred seaman.