You can restore the messages only if you have performed a backup of the phone using Samsung Kies. If no backup was performed then your messages are gone forever and there is no way you could get them back. In case you performed an upgrade to a newer version of the software using Samsung Kies and the messages were deleted then you can restore the backup (if it contains messages you had) using
Menu > Emergency Recovery. Select the backup and click
Restore. This solution applies only when you have performed an upgrade to your phone in other cases you messages are deleted forever and there is no way to get them back.