A study of cognitive and psychological alterations due to chronic insomnia: assessment and management