Setting up a quiet, dedicated environment is good advice in my experience. My project for this year has been to write, consistently, every month. I try to record 4 songs a month with at least one original. The key to this project has been to establish a regime: 3 nights a week after work, after the kids are washed up and in bed, I go to my space and I record.
I haven't always hit the 4 song mark every month this year but I've been pretty consistent.
Prolific authors tend to do this and I realized this is how I manage to keep up with software projects as well. So why not music?
My theory is that creativity can be made into a habit.