(Reaching Legacy before the end is NOT required to get all your memories back ftr, there will be an option during/after endgame. But I figured some people might also prefer it this way!)
Well, for me at least, it's... complicated, since. I think Mayu's stuck in the book until the book is resolved as a whole, but uh. She can't really go back to her own world, so...