Not sure if you're using the website (not even sure the website still works on mobile as FB was pushing really hard for people to use the app), but on Messenger just tap on your profile picture and you'll see the Settings. There you can turn your Availability on or off.