Toggling USB mass storage on (or off) via adb commands
Alas, the UsbStorageActivity doesn't use an intent to enable and disable USB mass storage, so there's no way to achieve this using am. It instead calls the functions StorageManager.enableUsbMassStorage and `StorageManager.disableUsbMassStorage to do its work. As these functions are hidden in the framework, it's not possible to write an app to do this, either. As far as I know, there's no existing command to do this.

It might be possible to write an app that offers a command-line interface and uses the bound system service MountService to call its setUsbMassStorageEnabled function, but that would be way off-topic for this site.