Using considerations based on the thermodynamical Bethe ansatz as well representation theory of twisted Yangians we derive an exact expression for the overlaps between the Bethe eigenstates of the SO(6) spin chain and matrix product states built from matrices whose commutators generate an irreducible representation of so(5). The latter play the role of boundary states in a domain wall version of N = 4 SYM theory which has nonvanishing, SO(5) symmetric vacuum expectation values on one side of a co-dimension one wall. This theory, which constitutes a defect CFT, is known to be dual to a D3-D7 probe brane system. We likewise show that the same methodology makes it possible to prove an overlap formula, earlier presented without proof, which is of relevance for the similar D3-D5 probe brane system.