Out of juice

It happens to me every now and then to drain my car's battery simply by leaving it overnight with some electrical device powered on.