Taking amitriptilyne occasionally to aid sleep

Patient: Is it ok to use amitriptilyne occasionally as a sleep aid rather than take it daily

Symptoms: I was prescribed amitriptilyne for pain in various parts of my body and to help me sleep. Just10mg a day but i have coped without it for 3 weeks except i dont always sleep well. I would like to take 20mg just occasionally when i feel in need of a good nights sleep. Would this work