The answer could be different for each person-- you you are the only one who can answer the question.
Here are a few things you should consider, before jumping in.
1. Is anyone else dependent upon you. Your decision may affect others.
2. Do you have some savings? You might have to live on what you have put aside for an extended period. If you have no money put aside, you may want to keep the 'real' job until you have some monetary security.
3, Have you researched how to make money through writing? If so, do you have a portfolio of written or published work that you can show to potential customers?
It is always best to make your living doing what you love, but a little forethought and planning makes it much easier to follow your dream.
You may hate your job, but if you know it is only for a short time and you are working toward your own ideal-- it will seem more bearable. If, in the meantime, you find another job that is less stressfull, perhaps even part time-- that could help, too.