A good number who leave the military after 5 years (or 6, or 10) end up wishing they hadn't left. Others are glad they left but are a bit aimless for a bit in terms of finding a job and finding job satisfaction (not always the same thing). And for others, it's absolutely the right decision.
As posted above, decisions on staying or going are based on so many different things that it's hard to generalize. Things such as: deployments, war, civilian job market; promotion opportunity in the military, family issues (spouse job, relocation), likely career path, retention bonuses, separation bonuses, job satisfaction, etc.
As someone who left after 8 1/2 yrs and am fully satisifed today but also am very glad for the time spent in the USN . . .
(1) Don't leave the military just to get away from it, leave the military to go somewhere and/or do something. Having a real purpose beyond just "getting out" and working for a defense contractor (which is where many end up until they find something better), makes the transition much easier.
(2) Do the money math in terms of what you're currently earning, what you owe, what you will realistically make in your new job, likelihood of being let go, etc.
(3) Once you've made the decision to leave, DON'T LOOK BACK. It does no good to think about where you'd be stationed, whether you'd be promoted, whether you'd deply to Iraq, ad nauseum. That doesn't mean you can't have fond memories of your military days and retain your military friends (I do both). But dwelling on what might have been only serves to make you less successful at your future career.
And finally, consider an adage told to me by my father:
Wherever you are is the worst;
Wherever you're going is the best;
And wherever you came from isn't as bad as you thought it was when you were there.