I recently purchased a small CRT TV and have been hooking my old consoles up to it, and I noticed the analog stick on my N64 controller was in pretty rough shape. The deadzone was gigantic and it was affecting my performance in some games, so I decided to look into repairing or replacing it with a new stick.
I settled on this replacement stick, available for $11 from Amazon at the time of this writing.
The replacement process is very easy and takes only a few minutes, with no special tools required other than a small philips-head screwdriver, though a flathead screwdriver and some needlenose pliers will make the job easier.
To start, just flip over the controller and remove the 7 large screws on the back, then remove the 2 small screws next to the memory card / rumble slot (they're easy to miss/forget):
Mine was very stubborn and required holding the connector housing in place with my fingers while prying with a flathead screwdriver, alternately loosening the sides until it popped out.
Once it's out, you just do the steps in reverse. The connector assembly was the biggest hassle and required some squeezing with my needlenose pliers before it would snap into place. The wires on the connector are pretty small, so make sure you don't accidentally damage them while squeezing, and don't rip the connector housing off of the PCB!
I had an additional screw left over (the middle black one from the analog stick assembly; it's actually part of the OEM stick assembly), but I just stuck it into the hole they left in the new analog stick, even though it doesn't thread into anything.
And here's the finished product: