Factors affecting sleep quality