You'll get a ton of people telling you to end it, that your kids will be happier with a happy mum etc etc.
Now I came from a broken marriage that really did need to be broken, it was abusive and dysfunctional and my parents couldn't have stayed together or parented together.
And their divorce, subsequent step families, living between homes, never feeling like I had a "proper family" or a real home, STILL did me so much damage I can't say I would have been worse off if they had stayed together. It is incredibly damaging for children to experience family breakdown. It is an Adverse Childhood Experience that correlates to a host of poor outcomes. It is not something to do lightly, or to wave away with a twee "you go girl, you deserve to find happiness, happy mum happy kids" - it really, really, really isn't that simple. Take it from one who knows.
So if you really can be friends, parent well, there are no arguments and no bad atmosphere, I would stick it it until the kids are grown up, and make your plans for your own life after that (whilst also being prepared for him to find love again with someone else and leave you any time). The question is whether you really can do that, or if over time the resentment will eat you alive. People are right that living in a home with parents who hate and argue with each other all the time is not a good option. But neither is divorce, even if it makes the parents "happy" - it's still a catastrophic loss for the kids whichever way you slice it. So you're choosing between two less than great options really.
Is your husband open to the idea of you having romance outside the marriage? You could look for someone to connect with, have sex with and have fun with, whilst still maintaining your kids' stable home.