Dave, My layout is in my basement and I had the same problem. IMHO, It is not temperature so much as humidity. This is not to say temperature won't cause problems, it will if the variences are extreme. But in my case the temp only varies from maybe 60 to 85 degrees. The humidity on the other hand varies greatly, from very dry during the months when the furnace is being used to very humid during the summer. I started my tracklaying with my bottom staging yard during the summer. Fortunately I suscribe to a very conservative approach to layout building, and never build over a section of layout for at least a year. I want to give every area exposure to the full range of temp and humidity changes before I constuct anything over it. By March, I had significant bowing on much of my straight track. I had started noticing it much earlier, but it kept getting worse. It had nothing to do with temperature. What was happening is this: The wood I layed the track on was expanded due to humidity. I used Atlas code 100 flex track secured with track nails. As the heating season progressed, the wood got drier and drier. This caused it to shrink. This in turn brought the track nails closer together. This is what caused the bowing. I did not pull up the track to start over. I used a dremel with cutoff disc to cut the affected rails. Often , this removed enough rail to straighten out the kink. Sometimes I had to remove just a tad more. It doesn't take much. On some bad areas I pulled the track nails for several feet made the cut, straighted the track and renailed. I have gone a couple years now without further change.
Humidity has apparently caused another problem which I hadn't figured out till recently. I have a handlaid yard with many turnouts which use Tortoise machines. One of my solder joints must have been bad and I needed to resolder one of my point rails to the throwbar. Afterwards, one of the routes thru that turnout was dead. I use the switches on the tortoise to supply track power to my frogs, and in this case with a stub ended yard track, I used the frog to power the length of track as well. Because the dead track only became apparent to me after i had resolded the throwbar, I assumed that i had resolderd it just a bit off, just enough so that even tho the turnout was throwing fine, the internal switch in the Tortoise wasn't throwing. I should mention that some time had passes between when the solder joint had broken and when I eventually repaired it. I repaired it during the summer. I hadn't done anything to fix the dead track issue, not being in the mood. I simply started using a couple cars as a handle to reach the clear point. The other day I ran a loco beyond the frog and fully expected it to stop. It didn't. I now have power in that track again. I think I won't next summer!
Folks who use foam for roadbed should never have this problem.
Gary