generally beneficial. I would encourage you to also ask your psychiatrist or treating physician about adding cognitive behavioral therapy for insomnia to the depression medication.
If this is not a long-standing problem, there is probably something more serious medically. That could include sleep apnea or PTSD or seizures or medication side effects or a harbinger of Parkinson's called REM behavior disorder. If these are "just" night terrors and they disrupt your sleep, treatment with medication is likely to be quite effective. Other entities would each have their own intervention. Seeing a sleep disorder specialist would be helpful.