- take a break from day to day development to do some strategic research: for example, a new technology that could be helpful to the company, etc.
- switch teams, or take on a different role within your team
- be on the lookout for anything, even something very small, that does motivate you; and figure out how to do more of that. you can't control what motivates you, but you can recognize when it is (and isn't) happening, and adjust.
Some things that have worked for me personally in the past:
- Going through a book like SICP, 7 languages in 7 weeks, etc.
- Organizing a hackday for my department.
- Since I am motivated by making things more efficient, taking a week to focus on better test automation and feeling the reward of making my colleagues' lives a bit better.