How do I retrieve Whatsapp messages from iCloud?

Not completely sure, but I don't think iCloud backups messages only. If you restore an iCloud backup on your iPhone and the messages aren't there, you can't do much.
WhatsApp has an in-app messages backup option. Did you enabled it?