Popper refused to be drawn into the “logic” or methods of discovery, his focus was the logic of criticism and testing. The nearest that he came to advice on this topic was in the 1983 Preface to the first volume of The Postscript, Realism and the Aim of Science where he suggested that you should fall in love with problems and pursue them relentlessly in an imaginative and critical manner.
Elsewhere he wrote that it helps to have a lot of ideas, but there is no way to guarantee that your ideas will be good ones, but the more ideas you have and the more critically you thinkg about them, the better. You need to think critically to minimise the time on research programs that have already been shown to lead nowhere. That is also why he advocated the historical method, to understand the roots of problems and to know how other people have tried to solve them.
Others have have suggested that people need to find out how they think most effectively – by drinking a lot of coffee, or walking in the park between intensive periods of work in the study or the library for example.
So here are some off the cuff ideas developed party by reading around the topic and put into practice in a small way in the course of postgraduate work in a large, world-standard rural research facility in Adelaide a few decades ago. Incidentally, working under the supervision of Keith Barley, the man who lent me The Open Society and its Enemies when I annouced that I was leaving because my research interests had shifted from agriculture to the social sciences.
Be interested in a lot of things and especially the problematic aspects of those things where more work needs to be done.
Get a good working understanding of all the rival schools of thought in the discipline, not just the one where you were trained. It might not be the most robust and helpful school of thought and if you don’t check out the others (properly) you will never find that out.
Try to have personal contacts in those schools of thought, if possible people who are alert and interested enough to be in touch with developments before they are published (which can take years). Similarly have contacts in the different branches of your own field. This will only work if you can explain your interests in a way that makes contact with their interests. You should also be able to explain your interests in a way that makes sense to your non-professional friends and your family and especially your mother in law (either Richard Hamming or a Nobel in economics said that about the mother in law). While you are doing that you will remember some important things that you had forgotten and you will find out that there are some things that don’t know and they are important as well.
Make personal contacts in other disciplines where your problems and interests lead. If you can’t find any work in other disciplines that is relevant to yours, you are not trying hard enough (mathematics does not count).
See Hamming, Mills and Koestler. Hamming and Mills are all a bit wordy, you can do a quick skim to find that you need.
Koestler was even more wordy and I dont recommend that you bother to chase up The Act of Creation which draws a very long bow about the springs on creativity through what he called the “bissociation of matrices”. He applied this to the Ah moment of mystical enlightenment, the Ah Ha moment of scientific creativity and the Ha Ha moment of making a joke. The creative bissociation occurs when a line of thought in one matrix (context) makes the right kind of contact with a line of thought in another matrix (context or discipline). Peter Medawar cast a very jaundiced eye over this book and triggered an exchange of letters with Koestler when he wrote a stinging review.
Whatever the merits of the theory, I read the book quite early in life, possibly during the honours year and it encouraged me to persist with a kind of “all over the place” approach, reading widely inside my (then) field of agriculture (specializing in soil science) and outside in literature, psychology, comparative religion, history, education etc.