The secret to a happier, longer-lasting marriage may involve much more than chemistry and compatibility.