Pilots are only allowed to stay in hotels with 100% blackout curtains
It is true that well-behaved airlines, who take an active interest in fatigue prevention, do try to book hotel rooms with blackout curtains and good sound proofing. This is however not a universal behaviour and not all destinations where layover is necessary have any hotels with these qualities.