I don' think that the CG allows husband and wife on the same boat. But I maybe wrong. Is one more ranking than the other?
Ship? Not allowed. Land unit? Usually they'll try to stick one at one command and the other at a co-located or nearby command. But there is no hard and fast rule. Needs of the service is paramount in all situations.
Caution: The author of this post is a product of the US public education system.