Just to add to what Machieng said - basically, any time you turn something into a location in Swahili, whether with the -ni suffix or a preposition (eg. katika) or prepositional phrase (eg. juu ya), the location can be used as the destination, the static location, or the origin. It's the verb that tells you how it is to be interpreted.
Ninakwenda nyumbani. I'm going home. (Destination.)
Ninalala nyumbani. I sleep at home. (Static location.)
Ninatoka nyumbani. I leave home / go out of home. (Origin.)