As someone who as done this UX research for 17 years, I say the best time is to show the pop up immediately when they enter.
There are well done pop ups and annoying pop ups.
In general, pop ups work.
If it's in the process of doing something it's annoying, but if you ask politely for peoples opinion, asking them in before they start an action is better than e.g. in the middle of typing something (delay)
THAT is annoying. Delay is something novices suggest.
Usually pop ups only annoy "UX people" and they tend not to be the target group anyway so don't worry about it.
It takes one click for user to close the pop up and they won't see it again. It's slightly "annoying" but they know UX is going to be better in long run if they participate in the survey and give their opinion.
Also, nowadays people know you don't get good content for free.