I think Jean grey unlocked both their old memories. We saw MJ crying while frozen. Later she was on the roof holding the black dahlia necklace which was a gift from Peter and smiling. When Jean possessed Bruce what did we get? Savage hulk, not Professor Hulk and he remembered Peter too. So I think Jean grey must have helped mj get her memory back.
the older i get, the more spider-man becomes less about powers and more about trying to stay hopeful when everything keeps changing. tom's peter always feels like a kid carrying responsibilities that are way too big for him and thats the version of spidey that hits me the hardest