In the primary repression phase, 'it is highly probable that the immediate precipitating causes of primal repressions are quantitative factors such as...the earliest outbreaks of anxiety, which are of a very intense kind'.
1 A psychiatrist treats mood disorders, such as anxiety and depression, which can contribute to sleep problems. Psychiatrists may conduct therapy and prescribe medication to relieve symptoms.  A psychologist provides psychotherapy to treat mood disorders that can interfere with sleep.
Doctors diagnose sleep apnea based on medical and family histories, a physical exam, and sleep study results. Your primary care doctor may evaluate your symptoms first. He or she will then decide whether you need to see a sleep specialist.