I try to keep notifications in my life to a bare minimum. I get tips from friends or co-workers about making sure notifications on my phone are disabled while I sleep. I disable them all the time. The one thing I allow are text messages to vibrate my Garmin watch, and I'm on the fence as to whether this is truly necessary.
There are people who's professions wont allow this. I get that. But I also know that most people build narratives about getting a late night text about the health of a loved one to justify always getting pinged when Facebook needs your attention, or a new email comes in. These are largely untrue, or at least building a process into your life for events that may never happen.
Instead I've made distractions I encounter my own fault. I can't blame Facebook for pinging me in the middle of focused work. I took control of what I could and my responsibility now is to check for messages when I need to. I check slack quite often, after each chunk of work, emails a few times a day, and social media rarely.
Have you ever thought about the value of all the different notifications in your life? If it not, it may be worthwile to audit all the things that vie for your time. It is your time after all, and with ownership comes responsibility.