I think you need to think about things more. Locking yourself away for days to code isn't healthy for anyone, whether you are 20 or 40 doesn't matter. There are ways to treat snoring, she can go to the doctor and figure that out. In fact, her snoring could be sleep apnea or similar causes and be life altering for her.

At least based on what you wrote here you don't deserve a divorce yet, you haven't earned it. You are contemplating one out of convenience rather than necessity. I have been divorced and am remarried, we've been together a little over 10 years total now and known each other for ~12. I can tell you getting a divorce should be the last resort, and it should be for reasons that are seriously unfixable. If you need to alter your lifestyle some to attain your goals (or at least try), do that with her and talk to her about it. For example if you want to do a marathon coding thing, ok, take a 4-5 day sabbatical to isolate yourself and work on an idea, no harm there. She'll work with you on that, especially if she sees it makes you happier.

If there are other reasons, like there is no love, you fight all the time in front of the kids, there is abuse, my answer would be different. But even now, go to couples counseling and see how you can figure it out before divorce. At the same time, if you are just set on being free of responsibilities and don't care, than you are right to get a divorce cause you would be a horrible spouse to someone (that doesn't make you a bad person in anyway, it just may be who you are). One thing I have learned, to stay married you have to sit down and renegotiate things every so often, because we all change as we age, so be open, talk about how things are different and figure out a new norm that makes both of you happy. This is why I highly suggest getting some outside help, they help you figure that out and negotiate it the first time.

Divorce sucks. It is the greatest destruction of wealth in America and is a horrible contentious process that is many times avoidable (but not always). I have seen friends (more than one couple) both agree they are getting a divorce and both say it will be totally amicable and they already have everything figured out. That lasts until they start doing the real math and realizing asset splits, retirement accounts, new rent, car payments, house, dog, bank accounts etc. Suddenly things get a lot less nice and people get hurt more than they already were which just feeds the fighting. And once attorneys are involved you will piss away $15-20k easily between you two, likely much more if there are decent assets to deal with, 6 figures on a normal 40 something year old couple that are moderately successful is not rare. Also, in my state like many others, the person with the greater income also has to pay the attorney fees (amongst other fees) of the person with the lessor income. It was designed that way to offset someone who made $250k/yr from taking advantage of the spouse who made only $50k/yr, but the way it is applied generally isn't so judicious. An example, my ex spouse and I had a difference of $20k a year in salary and I was ordered to pay all her fees, plus give her a bunch of cash and while we didn't qualify as a long marriage so no alimony, the judge punished me with way above normal child support. Also, take into account, you've been married what is considered "long" in most states (> 7 yrs), so someone will likely be getting alimony. Again, she can say she doesn't want it but if you are the major income provider she'll do the math later when her friends/family are talking to her and you will be paying it.

My whole last paragraph is to point out, do you really have it so bad as to accept all that as an outcome? I didn't even address the kid situation really, but that is even harder to deal with in many ways. So again, have you earned your divorce through attempting to fix everything for long enough with enough tools, resources etc? You may have in which case do it, and I wish you the best, but if you haven't please reconsider and figure it out for your own benefit.