Timing a career switch from math to TCS
My 2 cents. I would say that getting hired in the theory area in CS departments, even in good times like now, is difficult and depends on many factors. Counting on getting hired even with a productive postdoc is not a good idea. You should try but keep the expectations reasonable and be prepared to be hired in math and enjoy doing the work you like at the interface. If things work out really nicely you can try moving later in your career as well.