To control when your Mac goes to sleep and (if it’s a laptop) how much power it uses, use the Energy Saver pane of System Preferences (Tip).