I would guess that most people are most productive when they're alone. I've worked this into my routine by getting up early when I need extra time to focus, working from home when typical office interactions would be distracting, and coordinating "me time" with my family, so I can focus on tasks and projects that are outside of work.
It's taken a good deal of trial and error and sharing openly about how I best work and when I need some time.
In fact, today I had 5 hours to myself just for reading, thought and reflection. It's relaxing and productive when the people in your life are clear about your needs and intentions.