Amitriptyline- can't sleep

I’ve just changed to Amitriptyline and have taken it at bedtime the last two nights, and it was kept me WIDE awake for hours. I was expecting it to make me sleep but doesn’t seem to be the case with me. Is there a reason I have to take it at night, I can’t handle not getting any sleep when I’m up with my kids in the night and up at 6am. Can I take it any time? maybe earlier in the evening so it’s worn off a bit by bed time? Any experience or advice on this welcome