Unless the structure of the boat renders them unnecessary (quarter berths, pilot berths with partitions), bunks on a yacht must have lee-cloths to prevent the sleeper falling out due to the motion of the vessel. These are sheets of canvas attached to the open side of the bunk (very few are open all round) and usually tucked under the mattress during the day or when sleeping in harbour. Lengths of rope are attached to the upper corners of the lee-cloth, and fittings are provided above the bunk to which these lines can be tied, holding the cloth in place as a kind of wall across the open side of the bunk. (Source Wikipedia)