I had this issue too, and I contacted Apple Support. After a couple hours the conclusion that was reached was that it's simply a glitch/bug in the system that rarely happens. Their recommendation was to restore your iPhone to the latest backup, presumably the last backup before the problem happened - you should have all of your messages that way. The below information is assuming that you backed up to your computer and not iCloud - I haven't figured out iCloud just yet.
For me, it didn't work because we initially thought the problem was that I'm running an old iOS, so in the update process my last backup got replaced by a new one. If you think that's going to be a problem, you can go into iTunes, go to preferences, select device (where the list of backups are), right click the backup you have before the problem, and select archive - this will enable you to keep that back up file from being overwritten. In short, try restoring your iPhone to before the problem started happening and it should work. Best of luck!