On an iPhone or iPad, you can log out of your Facebook account on the Messenger app.
Steps
Method 1 of 2: Use the Facebook application

Step 1. Open the Facebook app on your iPhone or iPad
The icon is a white "f" in a blue square and can be found on your Home screen.
- Messenger app does not have an option Logout. To be able to log out of your Messenger account, you will need to use the Facebook app.

Step 2. Press the ☰ symbol
This button is located in the lower right corner of the screen. This will open the navigation menu.

Step 3. Scroll down and select Settings
This option is at the bottom of the menu. Another menu will appear.

Step 4. Choose Account Settings
The account options will then display on a new page.

Step 5. Select Security and Login
This option is located near the beginning of the menu Account settings.

Step 6. Locate the Where you are logged in section
It lists all your active sessions. This includes all connections to Facebook and Messenger, whether on mobile or computer.

Step 7. Tap the ⋮ icon next to your Messenger session
Find the Messenger session you want to be disconnected from under the heading Where you are logged in, then click on the symbol next to it to see the different options.

Step 8. Choose Logout
This will log you out of your account on the Messenger app.
Method 2 of 2: Switch accounts

Step 1. Open the Messenger app on your iPhone or iPad
The icon looks like a blue chat bubble with a white lightning bolt inside.

Step 2. Tap the Home tab
This button looks like a tiny house and is located at the bottom left of the screen. A list of all your recent conversations will be displayed.

Step 3. Select your profile picture at the top left
Find your photo thumbnail located in the upper left corner of the screen and tap it. This will open the profile menu on a new page.

Step 4. Scroll down and tap Switch Account
The list of all your registered accounts will appear on a new page.

Step 5. Choose Add Account
This option will allow you to log in and add a new Messenger account.

Step 6. Log in to another Facebook or Messenger account
You can now log in and switch to another account. You will then be automatically logged out of your old account.