Link to an example of what you're talking about. Generally, yes you can switch on and off things powered by USB, though if in a high static electricity environment, I'd want to ground myself before touching the power switch and potentially sending a surge through the host's USB circuit, or a connected peripheral.