this is actually not entirely correct
If you use the wrong building materials, your temperature inside will be the same as the outside one. No negative effects, no positive ones either though. If you use the correct materials, your temperature will be adjusted. While the building pieces don’t emit any heat or cold, they can help you deal better with the outside temperature.
As the temperature effects can be a bit difficult to deal with, the safest option is always to log off naked with your stuff safely stored as you suggested.
@yuusuke57 Sorry, mate but there are no admins on officials and your stuff won’t be returned. Just follow the advice and store your inventory/hotbar in a chest before logging off to be on the safe side in case it happens again.