Treatment of sleep dysfunction and psychiatric disorders