Source: https://askubuntu.com/a/1264577
In sleep mode, the content of ram is kept as it is, and the computer works on a very low power mode, so as to keep the ram content intact (as ram will lose the data if power supply is cut to it). But in hibernation, the ram content is stored in the swap space, so power can be completely cut off. Hence it is recommended to have swap size as large as the ram size.