Molecular dynamics simulations are used to investigate the interaction of the polyhydroxylated cosolutes (CSLs) methanol (MET), ethylene glycol (ETG), glycerol (GLY), glucose (GLU) and trehalose (TRH) with a hydrated phospholipid bilayer in the liquid-crystalline phase at 325 K. The comparison is performed at constant effective concentration of CSL hydroxyl groups. The results (along with available experimental data) lead to the formulation of two distinct mechanisms for the interaction of polyhydroxylated compounds with lipid bilayers. The alcohol-like mechanism (active for MET and ETG) involves preferential affinity of the CSL (compared to water) for the superficial region of the bilayer interior, and is driven by the hydrophobic effect. It results in a lateral expansion of the membrane, a disorder increase within the bilayer, and a partial substitution of water by CSL molecules at the hydrogen-bonding sites provided by the membrane (predominantly at the level of the ester groups). The sugar-like mechanism (active for GLU and TRH) involves preferential affinity of the CSL (compared to water) for the bilayer surface (formation of a coating layer), and is driven by entropic effects. It results in the absence of lateral expansion and change in disorder within the bilayer, and in a partial substitution of water by CSL molecules (predominantly at the level of the phosphate groups). It also involves the bridging of lipid molecules via hydrogen-bonded CSL molecules, a phenomenon that may have implications in the context of membrane stabilisation by sugars. Hydrogen bonding itself is not viewed as a driving force for these two mechanisms, which only involve the (partial) substitution of water -lipid by CSL -lipid hydrogen bonds (the sum of the two remaining essentially constant, irrespective of the nature and concentration of the CSL).