Hmm, I could've sworn this happened to me while I was going through the story. Switched to something else, when I switched back in it was no longer mega, still had the item when the battle finished. Although I could be quite mad, that seems fairly likely too.
Presumably, your mega fainted, and you revived it. It won't be able to mega evolve again in that same battle.