When the Key Stone is activated, the Pokémon's corresponding Mega Stone reacts to it, starting the proces
A stone filled with an unexplained power. It makes Pokémon that battle with a Mega Stone Mega Evolve.
The key stone needs to activate before the Pokemon mega evolves, and it appears that the key stone holds the power that activates the mega stone, similarly how the z-ring reacts with z-stones. The trainer holds the object containing the power, while the power flows into the Pokemon. this is probably Gamefreak showing us that the trainers bond is needed to mega evolve, and the Pokemon cannot achieve this alone.
Edit: As for the "realizing one may be lying around somewhere", I assume you are referring to when we find the mega stones about the place. While this could be chalked up to the game developers not wanting us to get our hands on certain mega stones early, it may have to do with the keystone's power filling it up via being close, and that the stones are hard to spot/sightly buried in the first place, as well as characters finding mega stones about in the anime. However, this doesn't explain why it only worked between eight and nine o'clock. That is still quite a weird mystery, one that I might just bring to light...