The study, by Auckland University and Middlemore Hospital researchers and published in today's NZ Medical Journal, found medical students had lower rates of depression than those in other fields.
Rates of potential problem drinking were higher among students of engineering, law and architecture than among medical, nursing and health science students.
One of the researchers, Auckland University psychiatrist and sleep specialist Dr Tony Fernando, said the survey showed that sleep disorders, depression, anxiety and alcohol problems started when people were young.
"We need to know how common it is so we can address it at an early stage."
Ten per cent of all respondents had delayed sleep phase disorder, in which, typically, people can't get to sleep until after midnight and in some cases much later.
Dr Fernando said the disorder was a worse form of the normal, mild tendency of teenagers and young adults to go to sleep - and to prefer to wake up - later than younger and older people.
High schools and universities ought to consider starting and finishing academic classes later to accommodate this.
He said the majority of patients diagnosed with the disorder experienced improvements following treatment.
"We can make it much easier for them. It's possible to adjust their body clock by two to three hours earlier."
Others went to sleep as early as 5pm and woke soon after midnight. This was quite rare and harder to treat.
The researchers say the rates of recent suicidal thoughts or self-harm in the survey were similar to rates found in studies of tertiary students overseas.
Potential causes for depression and anxiety among such people include long work hours, sleep deprivation, increasing debt, challenging career decisions and uncertainty about job prospects.
The results:
• 1292 Auckland University students completed the questionnaire
• 39% - had significant sleeping problems for more than a month
• 17% - depression
• 20% - anxiety
• 16% - potential drinking problem
• 9% - used recreational drugs in the preceding three months
• 7% - recent thoughts of being "better off dead" or of hurting themselves
• 62% - "satisfied" or "extremely satisfied" with life
Source: NZ Medical Journal
From night owl to early bird
Dr Torrance Merkle sought help to change his sleep habits.
For Torrance Merkle, a good night's sleep would naturally start at 3am and finish at 11am. He couldn't nod off any earlier.
He has had to re-fashion his sleep habits to fit his day job as a doctor.
A second-year house officer at North Shore Hospital, Dr Merkle, 25, sought help for delayed sleep phase syndrome during the fourth year of his medical studies at Auckland University four years ago.
"For the first few years of university it was fine. I could stay up late and study. Morning classes were a bit of a struggle, but I often had a nap late in the afternoons."
As a fourth-year, he had to attend hospital ward rounds in the mornings but couldn't get to sleep any earlier than usual.
"Every time I sat down I felt like falling asleep when it was at its worst."
A sleep specialist put him on melatonin medication and recommended bright-light therapy on winter mornings. Dr Merkle takes the medication 90 minutes before he goes to bed and wakes just before 7am. Light therapy involves sitting in front of the bright lamp while eating breakfast when he is starting work before sunrise.