The effects of two window states (closed or open) on the bedroom environment and on sleep quality were investigated. Twenty-seven subjects (14 males and 13 females, 20-33 years old) without sleep disorders and chronic diseases participated. The subjects slept for two consecutive nights with windows open and two consecutive nights with windows closed in four dormitory rooms adapted for the purpose of this study, one person at a time. The order of exposure was balanced among participants. Bed temperature, room temperature, relative humidity (RH), carbon dioxide (CO2), particles (PM2.5), and noise were monitored during sleep. Sleep quality was measured using subjective ratings, a wrist-worn sleep tracker, and (for one group of 14 subjects only) polysomnography (PSG) for home use; snoring in this sub-group and awakenings were also registered. Higher PM2.5 and noise levels were found with windows open, while higher room temperature, RH, and CO2 levels were measured with windows closed. There were no differences between conditions in terms of objectively measured sleep stages but the subjects with the PSG attached snored significantly less and woke up significantly less often when sleeping with windows open. Start sleep time, end sleep time, total sleep time (TST) and time in bed (TIB) measured with the sleep tracker were confirmed by the measurements made using PSG, light sleep (N1 + N2) and sleep latency were in moderate agreement but there was no significant agreement for REM and deep sleep (N3). When sleeping with windows open, the subjects rated the air as fresher but reported higher noise levels, feeling less rested, a worse mental state and well-being, and their replies on the Groningen sleep quality scale indicated poorer sleep quality. There was no clear association between the performance test score and sleep quality. These results suggest that sleeping with windows open can provide some benefits by increasing ventilation with outdoor air, reducing CO2 concentrations, improving air quality as indicated by the subjectively rated air freshness and some of the parameters defining sleep quality, but it may also result in some discomfort if there are episodic loud noise events outdoors. Further studies are required to clarify the role of open windows in achieving good sleep quality.