I've had this problem before, and the solution is very simple.
Just change the time, go back to your game, leave the room with the Mega Stone, and then come back to it again. The room just needs to refresh for you to collect the mega stone.
I just barely tested this, and it worked.
Hope I helped!