Yep as Maso said it is an antidepressant that effects the brain chemicals serotonin and norepinephrine. It is also used to treat some types of nerve pain as well as panic disorder and eating disorder. Hope this helps,

Amitriptyline is a drug approved for the treatment of depression. However, like other types of anti-depressants, it’s also commonly used as an off-label treatment for insomnia. Off-label drugs are not FDA approved for alternative uses, but because of relative effectiveness medications like amitriptyline gain new uses in popular medicine.

Besides its alternative use as sleep aid, amitriptyline is also used to treat pain associated with a wide array of medical conditions.