iMessage off and on on computer
It is not possible to forward text messages to your mac while
  your iPhone is turned off or in airplane mode.
  
  While iMessages are "just being moved" within Apple servers, text
  messages must be first received from your carrier, then synchronized with
  iCloud so that your mac can receive it too.
  
  With your iPhone being turned off, the chain of delivery is broken.


The following steps show the iMessage way.

Make sure you sync your messages with iCloud on iPhone and Mac.

iPhone - Sync Messages with iCloud

1. Go to settings
2. Click on your Account at the top
3. Choose iCloud
4. Activate iMessage


Deactivate iMessage on macOS

1. Open iMessage
2. Go to settings with CMD + ;
3. Unselect «Enable this account»




Reactivate your account by selecting «Enable this account».


When you reactivate iMessage on macOS, you'll be notified on your iPhone:


  Your Apple ID and phone number are now being used for iMessage on a new Mac. If you recently signed in to "«MAC_OS_NAME»" you can ignore this notification.