Sleep on it
Sleeping on a problem you have been working on for a long time can actually be a very effective means of coming up with a novel or creative solution. When the mind is sleeping it is more disinhibited than when waking. For this same reasons it is able to generate strange, wonderful and often otherworldly dreams. Some theories of dreaming state that because the brain is an organ that is always attempting to synthesize and make sense of reality, it is doing just that while dreaming, which explains why it often cobbles together figments of imagination, short memories from the previous day, hopes, fears and plans into strange but somewhat sensical stories; dreams we experience as having their own strange logic. We can put this same power to work for us by getting a good deep sleep after working on a problem from many different angles for an extended period of time.
Write down every relevant possibilty you can think of
No matter how silly or seemingly irrelevant, write down every idea that comes to mind while working on the problem. Play with these possibilities by drawing lines to connecting or related ideas.
Steady aerobic exercise such as walking, running or biking over a period of at least 25 minutes will raise your heart rate, expand your blood vessels, increase oxygen flow throughout your body and to the brain, and flood your brain with endorphins and neurotransmitters which can alter your mood and outlook. This can help you to discover new possibilities you hadn’t considered in your normal mental states.
Take a break for a few hours or days
Returning to a difficult problem with fresh eyes can sometimes allow you to see the solution instantaneously after a significant break.