I started making plans to go freelance a good 10 months in advance.
My desire to freelance was driven primarily by my desire to travel the States, and being able to have some kind of financial engine behind that. So that took all sorts of planning, and I don't think I would have been able to do it without extensive planning up front.
I gave my employer 6 months notice when I was leaving, which in retrospect seems like a ton but still felt like the right amount. I worked at a small company, so every person had an outsized contribution in the company.
Having 10+ months in which to plan my escape was the perfect approach for me and I think if I had jumped ship without planning I would have sunk. Two huge benefits were that I was able to build up a portfolio of work prior to leaving (for legal reasons I wasn't able to show any of my inhouse work as my own), and develop client relationships in advance.
When I actually left my company I had two solid clients, each with somewhat sporadic work at first (since they were still adjusting to my fulltime freelance status). It was a rough couple of months when I started, but I was working constantly, and through my existing clients I was meeting new people, which eventually paid off quite well.
Another advantage I had with such a long lead-in period was the research I was able to put into the places I was going. I found an absolutely phenomenal coworking spot, and that was a huge help in getting off the ground at first; I was able to tap into a solid network from day 1 and that really helped me get going.
Everyone is different and I suppose it also depends on your industry; but my full recommendation would be to plan your exit and make sure you have a) money saved up, b) a clear idea of where you want to take your freelance business, and c) you've begun to take the steps necessary to realize your goals and determine whether they're viable. To try and set that all up when you absolutely NEED money would I think be extremely difficult.