Thanks for your query. Depression
and anxiety may have both conscious and unconscious origins. Hence you cannot always pinpoint a reason. It is encouraging to note that you have improved with medication. What i would suggest is to consult your psychiatrist
to prescribe a long acting benzodiazepine
that would tackle the problem of intermittent nocturnal awakening associated with night mares. Also avoid consuming carbonated drinks/tea/coffee post sunset and keep your place of sleep comfortable. Hope you find my suggestions useful.
Dr Sundar G