Apparently macOS 10.12.2 includes a new feature called Enhanced notifications, and they can wake up internal or external displays to show notifications. Annoyingly, this new feature is enabled by default. To disable it, you need to go into the Notifications System Preference, and inside the ‘Do Not Disturb’ section, and check the “When the display is sleeping” option under “Do Not Disturb”

Source: External display waking up? Disable notifications when your screen is off - Jeff Geerling

I’ve been looking for this for a little while. It wasn’t obvious how to turn this off, and I keep coming to my Mac in the morning and finding notifications kept it on all night.