Change Device Idle Threshold

Modify when Mac OS puts devices to sleep

By default, Mac OS will spin down disks to save power after they have been idle for 10 minutes. This behavior can be enabled / disabled in System Preferences under "Energy Saver," as seen below:

The idle threshold (and various other power settings) can be fine-tuned manually via the pmset Terminal command.
Unfortunately, modifying the setting requires administrator privileges, which App Store applications do not have.

To alter the idle threshold, enter the command below into Terminal:

sudo pmset -a disksleep {NEW IDLE THRESHOLD IN MINUTES}

For example, to change the idle threshold to 5 minutes, the command would be:

sudo pmset -a disksleep 5

After entering your password, this will modify the setting for all states, including when the computer is plugged in and on battery power.
In order to only alter the setting for a specific power state, replace -a with: For example, to set an idle threshold of 2 minutes while on battery power and 5 minutes while charging, the commands would be:

sudo pmset -b disksleep 2
sudo pmset -c disksleep 5

Note: Setting the idle threshold to 0 minutes has the same effect as disabling disk sleep in System Preferences.
Read more about disabling disk sleep here.