Having writer's block implies that you're treating inspiration and creativity like it's some kind of deus ex machina, and it isn't.
Creativity is a skill you can train and (finding) inspiration is a job... at least in parts.
I generally don't run into it huge blocks, because I'm not a hippie and have a work ethic.
If you want to have music-making as a job, you damn well better start treating it like one!

Some simple rules, partly already mentioned:
-keep fit, stay healthy
-go out, see the world
-talk to interesting people
-enjoy other arts
-in general surround yourself with interesting and positive people, books, movies, things... (if you consume only shit, you'll produce only shit)
-show an interest in them
-be interesting
-get good so you're not limited by your skillset.