I think i agree with you that if sex were the only boring non-fulfilling area of my marriage, i would stay together 'for the sake of the child. but, patterns like the one you're talking about sometimes show up outside the bedroom too. Fulfill yourself first, (whatever that means for you - staying in your marriage, or moving outside of it) and your happiness and fulfillment will itself will teach your child. Usually when people say they are doing something for the sake of someone else, like you staying with your husband for the sake of your child, there's something else at play that is not being recognized. if divorce truly is the best thing for you (and i'm not suggesting that is in any way), then that 'best thing' for you will also be positive for your child.