Bananas. chips. salty nuts.
In your regular diet you are almost cetainly getting enough electrolytes, unless you are on a very low sodium diet.
On your rides, if you are doing really long & hard rides and/or it's really hot and you get salt marks - on your shorts, jersey, face - where you sweat, then you might need a supplement - and I agree the Hammer Endurolytes work. but they are expensive!
If you can eat regular food on your rides, a package of chips from a c-store works great. I find at about mile 85 a pack of doritos and a coke are a great way to keep going strong.
My friend swears by Tums as an instant cramp cure, haven't tried it yet b/c I rarely cramp.