Having been alive when both games were released I can say without any uncertainty Nights into Dreams had more hype around it but Mario 64 definitely was the one that has the legacy.
Edit when I went to Walmart with my mom and rushed to the electronics section to play video games the nights display usually had a crowd compared to mario64. But the mario64 display stayed up much much much longer.
Having been alive when both games were released I can say without any uncertainty Nights into Dreams had more hype around it but Mario 64 definitely was the one that has the legacy.
Edit when I went to Walmart with my mom and rushed to the electronics section to play video games the nights display usually had a crowd compared to mario64. But the mario64 display stayed up much much much longer.