Although there's no direct logout option in the Facebook Messenger app for Android or iOS, this article describes how to disconnect your account from the Messenger app (essentially the equivalent of logging out) without having to delete the app from your device.
The issue is that the messenger app doesn’t actually have an option to log yourself out. This is unlike many other apps where you have a clear button or option to sign out from your account. However, there are some ways to log out of Facebook Messenger on your devices.
Steps to Log out from Android Devices
Click on Storage and select Clear Data and Clear Cache.
Steps to log out of From an iOS: