I've had this problem before, and the solution is very simple.
Just leave the location of the Mega Stone and come back again. The game just needs time to reset itself before you can collect the stone.
I have adjusted the 3DS's time to 8 o'clock multiple times, and it has always worked for me.
Hope I helped!
(P.S. Make sure you have the Wifi off and that you set the time to 20:00 in the system settings, as the 3DS clock is formatted to 24 hour time.)