I don't think HIMYM has run out of material at all, I think they just made a few mistakes (some out of their control).
Firstly, Robin & Lily having extremely reduced roles really hurt the show, as Larry David and Jerry Seinfeld said, only idiots think that you can run a show without a female lead (they were referring to themselves, since they didn't write Elaine into Seinfeld until after the pilot).
Then, I think they gave Barney too big a role. Don't get me wrong, Barney's by far my FAVORITE character, but since his breakout status and Emmy recognition, they've mistakenly kinda made him the star.
Like some of my friends and I joke, Ted's become the least interesting character this season. Ted needs to be the star again, Robin & Lily need to balance out the cast again, and Barney needs to be the cool supporting role that he was for the first three seasons.
That's it, the show's great again if that happened. I might even experiment with bringing Victoria back as an obstacle between Ted and his future wife. I thought Victoria had far better chemistry with Ted than Stella or Robin.
A new concept I might explore would be Marshall & Lily drifting apart, because we know their marriage eventually becomes pretty cold...