Some of us believe in divine inspiration. Our muses are like female cats; they come over when they want, get only enough attention that they want, and then they leave, sometimes with a whap or a scratch on our hands for good measure.
However, some other writers say that divine inspiration is bull, that you have to just keep writing crap until one nugget of gold comes out - that's quantity. Or you work on one sentence today and get quality.
My muses are not different, but they and I have learned to grow together, and this is what I've found out:
They like treats.
Like female cats, she will trot on over when you shake that bag of treats, and sit patiently waiting - or she'll thwap your hand to have you get on with it. You give her the treat, and then she'll be affectionate, at least for a little bit.
Same goes for muses. If you give them something to chew on, they'll give you affection and words, and then most times you will be able to go along with your writing from that point. You may write yourself into a corner, but the most important thing is that one sentence, or one turn of phrase that is just..."wow."
One way of giving them treats is to write every day. Writing could be a blog post, a snippet of a story, flash fiction, a scene, a character sketch - anything. Just as long as it's your creativity flowing onto the page/screen/medium. It's probably going to be crap. But you will have given your muse something to play with, and they love to play. Writing every day does not stymie the muse's work - it helps them enjoy it.
If you write every day, you will never have a want for what to write about. However, sometimes I do, and then I turn to different writing prompt books, or things that are happening in my environment - the what-ifs - or even the what-ifs of history. With history, though, I get bogged down in research.
Also, if you write every day, it will be easier for you to write on command. Writing on command is similar to peeing in a cup for the doctor. When you get handed that little cup, all of a sudden you can't go. When you get handed a piece of writing due at a certain time, all of a sudden the creativity seems to dry up. If you drink a lot before you go to the doctor's, anticipating that you'll have to pee in that damn cup, then you'll WANT to go. If you read, observe, and get some treats then you'll WANT to do the writing and be chomping at the bit full of ideas.
Always set aside a bit of time every day for some writing. 100 words is good to start. If that's too much, then just do a Twitter post a day. It doesn't have to be about your life, but your characters, or an observation. And it doesn't have to be on Twitter, either. That writing is for you, not for anyone else to see.