I would give the carpets a good Shake and Vac, and if that doesn't work call in the pest controllers.
Not maggots, they are whitish. And they eat old food and dead things.
They might be carpet beetle larvae or some larvae from some packaged food like cereal or pet food.
Clean the house so the flies are not attracted there..
I visited my grandfather's house and in the place where he keeps the bin I found a lot of little reddish brown maggoty larvae things. I assumed they were dead and I cleaned them all up, but what should I do next. They were all over the carpet, will there be more?