I haven't done something like that, but it could be a reference to Amaterasu hiding in the cave or about anything as they have a fairly mixed religion with local and subcontinent beliefs.
BTW sleeping in a temple used to be a cool thing to do, but I think it's illegal now for non-Japanese.