"Let him be careless of this elementary precaution - and let his fellow-snotties realise this and one or another will "yarn his hammock" for him. To do this, after the hammock has been slung correctly by a virtuous Royal Marine bandsman, the villain of the piece will slip quietly into the flat and re-sling the foot end - never the head - by tying the hammock rope to the outside of the hook with several turns of cotton. This cotton is strong enough to support the weight of the hammock - but not its occupant. The unwary and careless snotty swings himself into it - down it comes with a crash-and in all probability the disturbance wakes up one of the sub-lieutenants who puts his head out of his cabin door, collects the victim and "remonstrates" with him in a way peculiar to Gunrooms"
In other words, the hammock is strung up in such a way that it collapses when he gets into it.
Student or Learner