If you’ve got a child who just won’t stay off his freaking computer without you taking it away from him every night, then macOS has got your back. There’s a feature of Parental Controls that’ll let you completely disable access to his account, meaning that after the specified time you set, he won’t be able to log in to his Mac. Nifty. A bit evil, but also nifty.
To be a bit evil, then, first go to your child’s computer and open System Preferences> Parental Controls. Unlock the pane by clicking on the lock in the lower-left corner of the window and typing in the Mac’s administrator credentials.
You can then click on the kid’s account from the left-hand list and pick “Enable Parental Controls” if the settings aren’t already on.
An important note here, though, is that if your child is the administrator of his Mac, you won’t be able to configure this; you’ll have to visit System Preferences> Users & Groups first, unlock the pane with the lock in the lower-left corner (using your child’s admin password), and create a separate administrator account for yourself using the plus button. With a password your kid couldn’t guess!
Once you do that, log out of your kid’s admin account…
…and log in to the one you just created. Then you’ll be able to open System Preferences> Users & Groups, select his account from the left-hand list, and deselect “Allow user to administer this computer.”
Whew! (And if you need more detailed help on creating users, you can always read Apple’s support article. I swear they’ve got one for everything.)
Anyway, once you’re the administrator on your child’s Mac (and he’s no longer one), you’ll open that System Preferences> Parental Controls section. When Controls are turned on, click on the “Time” tab. Underneath there, you can set weekday or weekend time limits or configure a bedtime range during which the account won’t be accessible.
When the time you’ve set is almost up, your kid will see a very adult-sounding pop-up window.
That drop-down will allow you to add more time if he’s truly not done with a homework assignment or whatever, so if you click that, you can choose an increment of time to add…
…after which you’ll of course have to enter your admin username and password.
But when the time elapses, your kid will be out of luck, as you can see from what happens when I click on the user-switching menu on my Mac:
You can of course override that as an administrator, though.
One more thing: As an additional safeguard, you might also visit System Preferences> Users & Groups and disable the so-called guest user if your kid is sneaky. If that’s on, it’ll let him log in to a different account and browse the Web, so that’s not great. As Apple notes, though, turning off the guest user makes Find My Mac less helpful, so I guess you’ll just have to decide whether bedtime is more important than being able to track down a lost Mac for your little whippersnapper.