When your screen has been off for a while, your phone begins dozing. Doze mode, according to Google, shuts off network access and defers any syncs. Instead, it waits for occasional "maintenance windows," when the phone wakes up briefly, to run those jobs. That means you'll still get notifications, but they may be a bit delayed, since they'll only come in during those maintenance windows. So-called "High Priority" notifications like text messages and phone calls will still come through right away, but emails, Facebook messages, and other less immediate notifications may lag.