I got the same message with fresh installed Ubuntu 18.04 and 19.10. It's probably because you need privileges to execute systemctl hibernate. To solve it, I did:
sudo visudo -f /etc/sudoers.d/hibernate
and added the following line:
%adm ALL=NOPASSWD: /bin/systemctl hibernate, /usr/bin/systemctl hibernate
Note: My user is member of group adm. Alternatively, you can add a new group, add all relevant users to that group and replace %adm by %<your-group>.
I'm not sure if this is best practice, but it solved the issue for me.
Furthermore, you need swap space (swap file or swap partition) of minimum size of your RAM in order to hibernate your computer.
From visudo manual:
-f sudoers, --file=sudoers Specify an alternate sudoers file location, see below. As of version 1.8.27, the sudoers path can be specified without using the -f option.