I understood it was to avoid head banging.
Now only practised by the RN when wearing their iPods I believe.
The Nore mutiny story (RN officers called for ringleaders to come forward and state their grievances, and they would not be harmed. Step forward the mutineers who were promptly hanged. Queen Victoria was told of this, expressed the opinion that RN officers were not gentlemen and it has been so ever since) was the version related to me several years ago by a then-RN colleague of many years service. Of course, the Nore mutiny pre-dates Victoria's birth by several years but 'never let the truth get in the way of a good dit'.