Far enough out to reduce the chances of non-modal peaks and nulls being introduced...modal peaks and nulls are another story and problem...although the two tie together overall.
Non-modal peaks and nulls are caused by a freq's wavelength and in relation to it's distance from room boundaries. Bass wavelengths are very long so reach all walls within the room.
Odd points: 1/4-3/4-5/4...ect,ect cause nulls
Even points: 2/4-4/4-6/4...ect, ect cause peaks
As you move the speaker out...and away from the wall you will pass through these wavelength points. The important part for bass in many rooms is usually to get out past the first 1/4 wavelength (null) but maybe not into the 2/4 wavelength (peak)...somewere in between these two first measurement points may be fine also.
If we use 100hz as an example:
2 ft 10 inches is the 1/4 wavelength for that freq...null
5 ft 8 inches is the 2/4 wavelength for that freq...peak
Of course all the other bass freq's have a different wavelength so have different measurement points in relation to the wall for their peaks and nulls.
5 feet (or so) works so well because it's far enough away to clear the first null for almost all of the lower bass points.
These same problems effect the listening position in relation to room boundaries...I'm sure you have read at this or other forums advice for placing a subwoofer at the listening position while you crawl around the room listening for the best bass...and then swapping those points between yourself and the sub.
I'm not the best at explaining things... even a worse writer, so sorry if this is somewhat unclear.
Dave