I don't know if that's just for sake of the joke or if you are living this problem yourself, but you can try apps like Digital Detox (for Android), or any other app that locks you out of your device.
Also, keeping the device(s) outside of the bedroom is quite efficient.