"When I was a child, I could sleep anywhere."
Translation:Kiam mi estis infano, mi povis dormi ie ajn.
Because you don't move somewhere else while you sleep.
"ie ajn" is for a location, "ien ajn" for a direction.
So you can walk "ien ajn" (to any place) but you sleep "ie ajn" (in any place).
You can't really "sleep from the living room into your bedroom", can you?
Ok. The -n at the end of ajn confused me. I wasn't sure why one word took the accusative but the other didn't. But that's just how the word ends, it isn't actually an accusative.
Ah, OK. Yes, "ajn" just looks like that; the fact that there's an 'a' or 'j' or 'n' in it is coincidence and doesn't mean that it's an accusative plural adjective.
(I think it's from the German word "ein" as in "irgendein" = iu ajn.)