From your question and your comments:
You are not doing Scrum. Your Scrum Master (arguably the most important role in Scrum) has not understood their job. They are there to protect the Scrum team. Scrum has no mechanism to protect a team from a bad Scrum Master. That your Product Owner is not keeping the backlog filled enough does not help either, but is of secondary importance as far as I'm concerned. If yours were a smoothly running Scrum team, you would simply jump in and help the analysts produce requirements when you are running out of those, but it seems that's not possible due to silo'ed analysts.
That said...
I would not worry so much about all of this. This happens all the time; Scrum is, in my experience, one of the most misunderstood aspects of modern IT. It's healthy on a personal level to accept this and not get too hung up about it. Yes, it is bad for the project and the company, but on the other hand plenty of projects like this survived just fine in the past, before there was Scrum or Agile around.
In your case, I would focus on your actual job of creating software, and start relaxing about the process. Sure, keep following the Scrum rules as far as you can, within the confines of your particular environment, but don't let a Scrum-gone-wrong (A.K.A. Zombie-Scrum, Scrum-But...) destroy your good mood.
Yes, sure, if your main "Scrum" team/project is not able to produce work for you, there is nothing keeping you from doing work from/for other teams. If this repeats, maybe you can naturally migrate into another, presumably better-working Scrum team in your company, over time.
Scrum aside, in any company, there is still one person who has the final say about what you do, and that's your direct boss. Put them into the picture with a small status email ("FYI, my main project didn't turn up tasks for me this sprint, I'll support team XYZ with their project for these two weeks - give me a head's up if you wish me to do something else") and then go find interesting IT work.
If you should have real downtime, sit down and optimize anything you can find. Be it something in your main project; researching a new framework; trying again to sit down with the requirements engineers to help them, etc.; or even just polishing up your CV...