Lack of sleep has cognitive impact: Study