What kind of messages? Email, SMS, iMessages? If email messages, you can retrieve them IF they are still in your Trash/Deleted folder. For SMS/MMS/iMessages, once you've deleted them, they're gone unless you have a different iOS or OS X device configured with the same iCloud/Apple ID and is configured properly. If so, check that device.