Ideally, you should wait a minimum of 30 minutes between applying niacinamide and retinol. This waiting period helps ensure that the skin's pH levels rebalance, preparing it for the next product.
According to the provided reference, "[t]he ideal amount of time to leave in between product applications is the minimum of 30 minutes. This allows enough time to pass to help the pH levels of the skin to become rebalanced and ready for the next formulation to be applied."