Once you are already cramping, it's generally too late for electrolytes to have a great direct effect. Hydration on the other hand is often a cause of cramps and taking on fluids can provide fairly quick (couple of minutes) relief...and for some (myself include) absorbing fluids is faster if there are some electrolytes in the mix.
Good article on cramping at Livestrong: http://www.livestrong.com/article/413398-bananas-for-leg-cramps/
It suggests in a non-direct fashion that maintaining a diet with the right minerals will help prevent cramps in the first place...and this is where the banana comes in. Eat it before the cramps for best effect.
Happy Riding!