Even at the senior level I don't think you'll get what you're looking for. Unless you're leading new research efforts, it won't make much sense to move you away from a system that you only understand.
A friend convinced me to quit my job a year ago and I'd highly recommend it. If you can afford it, quitting your job to learn new things can be a really valuable investment. There are so many new fields and textbooks out that could each easily turn into an interesting OSS project and some income. You can write a book about all the new stuff you're learning which which will help raise your profile. It takes a couple of days to really to the gist of any CS/Math field if you have access to the right resources and the right amount of free time.
So taking time off doesn't have to be a career hit, you need time to explore new fields (all the interesting ones are initially hard to grok) but you'll have a unique skillset by the time you're on the other side and will probably make more money if you decide to get a job again. This has only really been true post-internet.
If you wanna chat, email me, it's in my profile.