I try to stay away from my phone or at least social media for at least 1h befor I know I wanna go to bed. One I'm in bed I open the app, log it and then close it.
Disconnecting from my phone is the last thing i do before i go to sleep. So i do my evening routine (taking vitamins and doing yoga in my case) and i log those on this app. At the same time i log the 'disconnection' and then i set aside my phone for the night. Hope this helps!