I do it because I don't want to wake up in the middle of the night hungry/thirsty. Our bodies are working 24/7 - admittedly at a lower rate when we sleep but we are still using energy, so it is possible to create an energy deficit.
Amitriptyline is an anti-depressant but it is also used as a muscle relaxer at night for people who suffer from arthritis so they don't wake with as much joint stiffness.