A nighttime PC setup displays wake diagnostics, with a scheduled task and network adapter highlighted as possible wake sources.
A Windows PC that wakes in the middle of the night is not necessarily misbehaving. It may be responding to a scheduled task, a network packet, or a device that has permission to wake it. How-To Geek identifies those three common suspects; the trick is to find evidence on your PC before switching anything off.

First, ask Windows what happened​

Open Command Prompt or Windows Terminal after an unexpected wake and run:

Code:
powercfg /lastwake
powercfg /waketimers
powercfg /devicequery wake_armed

These commands answer three different questions. /lastwake reports information about the most recent wake from sleep. /waketimers lists timers that are currently active, not a history of timers that have already fired. wake_armed lists devices configured to wake the PC; it does not mean every device on the list woke it last night. If the PC wakes repeatedly, check /lastwake soon after an occurrence, before another wake replaces the event you wanted to investigate.

1. A scheduled task or wake timer​

Windows maintenance and other scheduled work can be configured to run while you are away. Task Scheduler has a WakeToRun setting that allows a task to wake the computer when it is due. That makes updates, backup jobs, and other maintenance plausible leads—not automatic verdicts.

If /waketimers identifies a task, find that task in Task Scheduler and review its Conditions tab for Wake the computer to run this task. Clear the option only if the task does not need to run at that time. Leave essential backup or maintenance work intact unless you have another workable schedule. The task name and purpose matter more than the mere fact that a timer exists.

2. A network adapter​

A network adapter may support wake-on-LAN through a Magic Packet or a separately configured packet-pattern match. Those are distinct mechanisms: turning off a setting labeled Wake on Magic Packet might not disable every kind of network wake the adapter supports. Nor does ordinary network traffic necessarily count as a Magic Packet.

If the wake report implicates a network adapter, open Device Manager → Network adapters, then inspect that adapter’s Properties for wake controls under Power Management or Advanced. The controls depend on the hardware and driver. If you use remote access that relies on waking this PC, disabling network wake may solve the nighttime disturbance by also removing a feature you wanted.

3. A mouse, keyboard, or other peripheral​

A wireless receiver, mouse, keyboard, or another connected device can be a candidate when it has wake permission. Start with powercfg /devicequery wake_armed rather than hunting through every Device Manager entry. Then check the listed device’s properties and, if an appropriate wake checkbox is available, disable it one device at a time. Microsoft also documents powercfg /devicedisablewake for a device named in the wake_armed output, but the graphical control is easier to reverse if you are unsure which device you are changing.

A missing Power Management tab is not, by itself, a fault: the tab and its controls depend on driver support. Also remember the practical trade-off. If you remove a keyboard’s wake permission, you may need to use the power button to resume the PC.

If none of the three checks gives a clear answer​

Check the PC’s available sleep states with powercfg /a. On a Modern Standby system, background activity, a system waking internally, and the display lighting up are not always the same event. Microsoft documents a powercfg /sleepstudy report for examining Modern Standby sessions; it can provide more context when a simple last-wake result falls short. Microsoft also cautions against casually changing device power-management settings on Modern Standby-capable systems because some changes can increase battery drain.

The sensible approach is less dramatic than disabling every wake option in sight: inspect the last wake, check active timers and permitted devices, change one implicated setting, then see whether the overnight wake returns. That preserves the useful parts of Windows power management while giving the mystery wake-up fewer places to hide.