How to recover iMessages sent to main phone number when using a different SIM card overseas?
Apple stores iMessages on their servers only until they are sent to your device. Therefore, they will be sent to your iPhone once you put your original SIM back in. 

Another option would be to add an email address to your iMessage account and then even messages sent to your original number will be forwarded to your phone with the temporary SIM in if it has the email address associated with your iMessage account.