Look in the list of mailboxes on the left hand side of a mail browser window.

You should see:

ON MY MAC
• Time Machine
• • Recovered Messages

When Time Machine restores a message, it doesn't want to automatically put it back on your IMAP server, so it restores it into an ON MY MAC mailbox. If you want it back on the IMAP server, you can drag it there yourself. (And of course, if you're using POP, the message cannot be put back on the server.)

Note that ON MY MAC can be hidden. If you've done that, you might not be aware that there's now something useful in it.