Inspiration comes from so many sources. Music, other fiction, the non-fiction I read, TV shows, films, news reports, people I know, stories I hear, misheard words or lyrics, dreams... Motivation? The memory of the rush I get from a really good writing session - even on a bad day, I know I'll find that again if I keep going.
The first rule of world-building is available physics, which basically means that if you want it to feel real, it has to follow the same rules as this world, from gravity to how human behaviour works. If you have a fantasy element that doesn't obey the laws of physics, make sure that it has a fantasy explanation.