Yes Amitriptyline is a good med for a lot of things. I'm sure if I took it earlier in the night it wouldn't have given me that groggy feeling the next morning, but I have an aversion to any kind of sleep aid (it's a long story, but involves a very long and painful tapering process off diazepam) so I never taken anything for sleep until I actually know I'm not going to get to sleep, and that's usually no earlier than around 11pm. I will never take anything for sleep earlier "just in case".
One of the side effects I also found from using a higher dose of Endep (Amitriptyline), along with restless legs, is a dry mouth which is very uncomfortable, so another reason to try to keep the dose as low as possible, for me anyway.