Perhaps your subconscious has noticed other signs of potential trouble from whoever left the rock, leading to hyper vigilance as a defense measure, which has a lot of overlap with mania.
Your manic episode could have been triggered by the adrenaline and norepinephrine release of the hypervigilant state.