Temperature and humidity changes can really mess up guitars. It is best to try to control these as much as possible.
Not so much any more..... but back in the day when I was gigging and my guitar was in and out of different temperature and environments with humidity changes, I had a guitar case humidifier. Dip it in water ever couple of days and it kept the moisture fairly constant in the case... or at least that was the intention. Now, my guitars rarely if ever leave the conditioned space of my studio where the temperature varies slowly depending on the season but the humidity is fairly constant and the guitars mostly live in their cases until a short recording session is called for. Well, I do have one acoustic that hangs on the wall and is often the one I grab to flesh something out when I need that.