Mirtazapine is an AD and, as such, isn't something you should take as and when you feel like it. If you're going to take it, you have to take the prescribed dose everyday. Talk to your dr, if the ami is helping, it may be you don't need the mirtazapine (though 9 days seems a bit early to see a steady improvement). If you're struggling with sleep, ami can help with that or there may be other alternatives the dr can discuss with you. Additionally, usually the dosage of ami for pain relief is lower than using it as an AD so there may be options there
Please talk to your dr, taking the mirtazapine now and then when you need help with sleep is not going to help you