Luck.
No one has been able to come of with a "trick" that works the majority of the time. Back when I kept them I tried;
Less light, more light.
Less food, more food.
Hosting a clown, not hosting a clown.
Low flow, high flow.
The results were always the same -- long tentacles.