I wouldn't advocate anyone stay in an unhappy marriage.
Say there are children involved - what are you teaching them by staying? That it's okay to be miserable your whole life?
Do you really think you are unaffected in other ways by your unhappiness? (possible examples : bitterness, fights, blaming, depression, jealousy of happy people, health issues, lethargy, no motivation at work, don't want to think anymore)
There are other reasons I can think of for not leaving.
Just remember that everyone has different circumstances in their lives, have learnt different lessons, and want different things. Look after yourself and make a life worth living, one that you can be happy with, and proud of (it's possible). And don't lose sight of what others want or need either. And still go about making your life what you truly want it to be.