Do you have your media on an external / network drive and automatic updates for that library enabled?
If Plex attempts an automatic or scheduled/periodic update of your library while the drive is not connected (or doesn’t spin up fast enough), that can result in Plex considering the items gone. If you have set Plex to automatically empty its trash after every scan, this will result in your library being gone.
If that’s the case…
Make sure to disable Settings > [Server Name] > Library > Empty trash automatically after every scan