Bad first night on sertraline

Hi all, Ive just switched from Mirtazipine to Sertraline as it was making me so drowzy. I took my first 50mg tablet last night and it was so awful. The whole night was one long panic attack with cold sweats and not so much as a wink of sleep. Thankfully I've got the day off today but not tomorrow. I'm now really nervous to take the next tablet but I so want to get better. Should I take it earlier in the day? I'd really appreciate any tips that can be offered. Thanks in advance