Here's how I understand it:
Mind Flayer attacks. Could be a full attack with all 4 tentacles. Each tentacle that hits gives him a free grapple check to hold with that tentacle. If the flayer hits with all 4 and gets 4 holds, and if the target does not break the grapple on his next action, when...