Roof bonus

Roof, or underground bonuses affect work times at workshops and sleep efficiency.
 * Roof 25% faster
 * Underground 15% faster

Sleeping on bed under roof/underground adds bonus 25%/15% to "Turns to sleep" timer.

To determine which bonus is applied, game check upwards from utility/bed to see if there's any wall or terrain block directly above.

If terrain block is found first, then it's underground.

If wall found (roof blocks counts as walls), then it's roofed, even if it's only one block hanging from scaffolding.

Source
http://www.townsgame.com/forums/viewtopic.php?f=8&t=10110&p=64172&hilit=roof+bonus#p64172