I built a layout for a friend in a concrete garage, unheated, and then extended out under a boarded-in car-port - virtually outside, except from being sheltered from the rain. For the winter months, there could be problems with bad connection from the track, especially if it wasn't run for a few days. The bit under the car-port suffered with the rails contracting in the cold at the same time as the wood expanded with the damp and vice versa in the summer - the bit in the garage didn't suffer as badly, though the runs were shorter in there. Stock-wise, there was little problem. Conditions in an attic are unlikely to be more extreme, this one was almost 'outside'...
Another friend has a large layout in a (very) well-insulated attic and all is fine.