When Nico doesn't feel safe his powers would react and send him somewhere it deemed safe.
Safe apparently is with Will.
Nico had a nightmare once about being locked in the jar, his powers reacted. He woke up snuggling with the Head of the Apollo cabin.
That was embarrassing to explain, especially when they started to become more confident in their friendship.
Hi guys I'm alive! Hope you liked this headcannon...
-GiveMehBooks