Study finds how improper sleep habits are linked to cognitive decline