iOS doesn't let any app change the official TikTok app, so the way to stop night scrolling without losing your messages is to open TikTok in minulo with For You hidden and lock the official app when you get into bed. I'm the developer of minulo, so keep that in mind.
First, what TikTok and the iPhone already give you, and where each one stops helping.
TikTok's own options
Sleep hours. In TikTok, tap Profile, the Menu button, Settings and privacy , Time and well-being and Screen time . Sleep hours is on that page. After your sleep time starts, TikTok mutes push notifications and shows a reminder to consider taking a break. What it can't do: lock anything. TikTok stays open.
Daily screen time. On the same page you can set a daily limit. When you reach it, TikTok notifies you and you can close the app or type the passcode shown on the screen to keep watching. What it can't do: stop you.…