I found maggots in my bedroom
Question: My wife and I recently found four white "maggot" looking bugs in our bedroom. They are somewhat translucent, have a pointed head and move like a centipede. They are approximately 1/2" long. I have searched everywhere in the bedroom but cannot find a source or additional bugs. What are they?
Answer: Well, these are fly maggots, probably blue bottle fly maggots. Something has probably died in the wall void, in the closet, somewhere in the bedroom or even in the attic above. The bottle flies found the body, the maggots were in it feeding and, now full-grown, they have crawled away to find a place to form a pupa, which is the brown thing you have in the picture that you provided.
So, vacuum what you can, and be prepared for some blue or green bottle flies to appear in the house in about two weeks. They will do no harm and not re-infest; an aerosol will control them, or you can simply open the window or door and let them out.