I am not a music creator but a 3D artist, but this is something I think every artist, no everyone experiences.
Take photographs and travel, walking around the city. Try to makeup stories for the people.
Doing a other art form. For example writing or painting.
Doing contests, freelance work and hobby work, you will always end up thinking "This is what I would do if it was my project".
Don't burn out, pace yourself. Most longest blocks isn't because of a lack of ideas, it's often because your mind doesn't want to do the work anymore.
Creativity and inspiration comes from life, getting out of the comfort zone helps a lot. Even painful and embarrassing situations can turn into something good.
Unhealthy ways:
Fasting (Abstaining from food). The constant hunger helps a lot. This is a penalty type, where you can only eat after the block. Remember to drink juice and to get medical advice before starting, Don't blame me if you die.
Working while tired. The numbness prevents over thinking. Very unhealthy and can lead to organ failure.