Why does the multiplayer button in Minecraft PE change from on to off?

Here are some things that might help you :

  1. You should check that the Minecraft version you and your friends are using is the same.
  2. Do you own another account that has also signed in before? You may be sending the invitation through the other account (which you are not friended with your friends' account) and receiving their invitation through the account you think you are using now.
  3. You can try logging out and then logging in again. It may just be some tech problem.
  4. Empty your friend list and then invite them back.