How to overcome lack of ideas periods?
In my experience a major point is to engage with other's research. The most common occasion is to attend regularly seminars, and go to conferences. By listening to research talks, you will learn about tools which might apply to some of your questions, and about questions for which you might have the right tools.

Another possibility is simply to read other's research, but it is quite difficult to decide in what direction to read, while when you have a weekly seminar to attend you get in touch with ideas regularly without having to be proactive.

Maybe there is a subfield, with connexion with what you already know, where you heard things are happening and someone wrote a nice survey? Then read that and see if it leads you somewhere.