I did this a few years ago, taking 1 year off. I was a bit nervous being in my 40s, but it did such immense help for me, I recommend it for anyone who is willing to work hard during their time off. I pivoted from enterprise software to backend development for various online companies and I'm very, very happy.