The ED due to that surgery might be either temporary or permanent. Thus, when the muscles inside the penile area are relaxed, more blood will enter the penis and a hardon will occur.