I took 6 months off to work on a side project and build a business out of it. It was one of the best things I've ever done. The job I got straight after was a direct result of my side project. Although the business did not thrive, I learnt a lot about what not to do as well. 6 months is a long time, and I felt too comfortable taking my time with things like trying to make the code perfect. If I were to do it all over again, I would have focussed more on other parts of the business like marketing and creating value than writing clean code.
I took off 18 months in my early 40s to study a few subjects that really do not have much economic value.
I would say it was ultimately a mistake. While I stormed out of the gate I got way too comfortable after a few months and ultimately lazy. The mistake was in thinking this wasn't going to happen for me. I would also say the subjective feeling of time was much too fast.
The upside though was that was my retirement basically and the realization that is not what I want from life is quite valuable.