Here you go:
https://ubuntuforums.org/showthread.php?t=2432961
Also works for 20.04. As you see it’s a bit more involved than just editing one file.
Your SWAP partition must be larger than your RAM. Also, a resume from Hibernate takes longer than a cold boot. Ask yourself if you need this functionality.