When do miners stop waiting for new transactions?
They were never "waiting" in the first place.

A miner is incrementing nonces and computing hashes continuously.  As soon as a new transaction a2 arrives, it is added to the Merkle tree, the block header is regenerated, and hashing continues with the new block header.

It's misleading to call this a "restart", since that implies there was some progress that is being lost.  Mining is progress-free.  Each hash is an independent trial with equal probability to succeed, regardless of what the underlying block header is.

To emphasize this, suppose you have a block header h1 on which you have already tried a billion nonce values, and a header h2 which has just been generated and on which no nonces have been tried yet.  If you have the choice as to which one to hash next, which should you choose, for the greatest chance of finding a winning nonce?  The answer is, it makes no difference - they both have exactly the same probability.  So there is no harm in switching to h2.