While it is never explicitly stated in the movie it could be assumed that Fry is not affected because of his Delta brain waves. These brain waves have caused him to not be affected by certain things such as the giant invading brains.
As for Leela, it is unknown. It could be that her behavior control collar effected her in some way that resulted in her memory staying in tact.