Sometimes a spouse takes you for granted. And if you follow the standard advice to be even more loving, they just take you even more for granted, assuming that you're going nowhere. Sometimes a spouse like that will only wake up if they hear the following:
"I was thinking that since you aren't interested in having sex with me, it's something that isn't important to you. Well, that's OK and it doesn't mean there is anything wrong with you. And so I was thinking perhaps you wouldn't mind if I had a friend with benefits, while we continued staying together anyway."
So, at this point you haven't actually done anything, you've only suggested it. Now, if that conversation doesn't wake them up, I don't know what will!
You detach by leaving. You don't have to say anything.