It's pretty easy to set up OfflineIMAP or isync or similar to sync a local copy of your mail (in fact, this is a great way to back up your IMAP mailboxes whether you use mutt or not!).
Then you just point mutt at the local copy instead of the IMAP server and it doesn't matter if you're online or offline.