I think an “ideal length” would be subjective in an audio situation but as long as the length supports the speed/bandwidth criteria I don’t see why it would matter.
USB 2.0 is supported up to 5 meters (16 feet) while USB 3.0 falls to 3 meters (under 10’) assuming these are not powered. It’s possible to add powered extenders but that brings in other considerations such as common mode noise.