It's like asking what is the right amount of white paint to add to a dark blue to get an optimum shade of blue. It really depends on what shade of blue you like!
With light source softness, it depends on the size of the subject, size of the softbox, single or double diffusion, and so on. But in general, the larger the softbox is in relation to the subject, the softer the light will be. A small light source next to a golf ball will be very soft, yet the same light source next to a refrigerator will be hard. And the right amount of softness is also different for each persons taste.
So there really isn't any optimal distance, as it's subjective as best. Look at your shadows, and if you want it softer, move the softbox in closer and closer to the subject, which increases the relative size of the light source. If you get real close and it's still not soft enough for your taste, then use a larger softbox and start over again, moving it closer and closer until you get it. Eventually, you'll say, "Yea. That's it. I like it!". Then you'll know its at the optimal distance 