Opinions will vary on this. Some will say it's fine; some will say it's a bad idea. Personally I'd never advise someone to quit gainful employment to study for hopefully-gainful-er employment (yes, I realize “gainful-er” isn't a word haha). However, whether it's a good idea or not doesn't really matter now, cause it's done. All that matters now is what to do now that the exams are passed.
And…I'd say what to do now is job search as a full-time job. Make sure that 10 months to study doesn't stretch to 20 months due to a 10-month job search. Search for a job like your money runs out tomorrow. The sooner you return to employment the better for your resume, and hopefully all the looking and searching will allow you to find and land the dream job. But, don't hold out for the dream; when you're unemployed, there's a bit of a stigma that goes with it, and people wonder if it's voluntary or if there's something unemployable that they're missing. So, be willing to accept something that's less-than-dream, if necessary.
You've got your CPA exams passed, I assume you have the experience requirement met so are just a paperwork process away from being licensed, you have good academic qualifications. Convince people that your work is good, too, and in 5 years' time, the 10 months off shouldn't have any negative effect on your resume.