To be honest, I don't think the writers thought it through enough when they had Buffy say she was in an asylum before Sunnydale because she told her parents about vampires.
I mean, in the earlier seasons, there is no foreshadow about the asylum, and don't you think Joyce or even Buffy would have broughten it up when Buffy told her she was the slayer? And in Bad Eggs when Buffy mentioned vampires, Joyce responded as if Buffy was being silly, but if she was put in an asylum for talking about vampires before, don't you think Joyce would have been more concerned when Buffy mentioned them again in Bad Eggs?
I like to believe that Buffy's memories of being in an asylum before Sunnydale was just from the venome she was poisoned from. Because if it was really canon, well the writers didn't think it through enough, and it just seemed so random...
Just my two cents. 😛