Don't quit the day job
As tempting as it may be, it wouldn't be wise to quit your day job to go freelance full time until you have both tested the market and built relationships with a network of good quality clients and suppliers. Even if you land a project that will set you up financially for a few months, there is no security to ensure that there will be enough work to keep you going after the project ends, or even that the project will not run into some type of complication that will jeopardize what and when you are paid.
Being successful in a company employing you as a programmer and being successful as a freelance programmer are two different things that you will quickly learn as you work on freelance projects. If your background is working in agencies who provide services to their own clients, you will already be aware of how there is a need to strategically develop your code to manage on-going change requests, which is something that may be alien to you if you have only worked in organizations who are highly organized and/or have little changing requirements relating to the code you have developed for them. Using your time to experiment with freelancing will allow you to gain an insight to the situations you will encounter on freelance projects and so allow you to learn to strategically design your code for better flexibility that can handle changing specifications—especially for projects where the budget is fixed and the client has unrealistic delivery time expectations.
Instead of seeing your freelance career as an alternative to your day job, start it as an experimental hobby that complements your financial income. The hobby itself should contain both the business and technical skill elements that you want to eventually turn into a full time career. This method allows you to experiment in a way that jumping into freelancing head first wouldn't allow you to - by allowing you the flexibility to make mistakes and build your business model around your experiences. If you are good with both the business and technical aspects of what you wish to turn into a freelance career, you will be able to identify, develop, and refine aspects of your service to appeal to segments of the market that fit the types of ambitions for the projects you wish to work on. It's through this experimentation that you can closely integrate your marketing activities to build a brand and reputation that will enable you to build a stream of work from recommendations resulting from your experimentation—something that you would otherwise not have been in a position to do by jumping head first into full time freelancing.