In my document I want to have three different headers and five different backgrounds and one footer. Do I need to create a separate master page for each combination of header-background-footer? Or maybe there is a way to apply a few master pages to one regular page? Thanks.
Well, in total that's 15 different possible configurations. You could definitely create masters for all 15 (16 actually 1 for the footer then drag that master to the other 15). This is probably the easiest method.
I don't think this would be easier than just creating 6 masters (5 background + 1 footer) and then manually adding the desired header to each page.
With so many combinations, no matter how you set things up it'll be a bit complex.
You can apply one master to another master, but I'm unaware of any feature which allows you to apply multiple master pages to a single page.