Some thinking-intensive work can bring you at the edge in just 3 hours a day. After that, you generate more problems than solutions. Especially mathematicians are prone to this. Similar cases in software development need to be respected.
3 hours of thinking-intensive work is fine. Then take lunch/walk/shower, and sit down to write documentation, update bug reports, chat with a coworker about your ideas, review someone else's code.....