Set pmset to sleep in a specified time
The pmset command is incredibly powerful. Have a read through it’s manual page to get an idea of all the features it has. To achieve what you are looking for, you could use the scheduler built into every Mac by defining the correct date and time you wish your Mac to go to sleep: pmset schedule sleep "09/01/2018 00:00:00". 

As far as I know, this does not allow you to set a schedule with a relative time though. A potential workaround for this would be to write a simple two-line script that first lets date figure out what “10 minutes from now” means. The -v +10M switch will let you do that. Again, read the manual page for full details. 

I have a script that, every 10 minutes, schedules a ‘power on’ in 2 hours from the current time for the Mac mini I use as a file server. When the power goes down, my UPS runs out and the machine shuts down, it will power itself back on automatically two hours later or whenever the power comes on after that.