We know it’s tempting, but if you can, avoid placing your subwoofer in a cabinet, as the vibrations caused from the bass produced by the subwoofer would create a bad sound experience. Instead, we suggest you place your subwoofer away from anything that could vibrate.
We normally suggest placing your subwoofer close to the soundbar, but bass frequencies aren't very directional, so you can place it further away without negatively affecting the sound.