Summarize this article:

Carefully apply an even, barely visible layer of dust around the perimeter of the carpet. The insects need to crawl across the dust for it to injure them, and they're more likely to avoid piles or thick layers of dust. Thick layers of DE are also more likely to get kicked up into the air and irritate lungs or eyes. Carpets are usually only treated on the edges so human activity doesn't kick the dust into the air (where it's more likely to make you cough than kill insects). If the carpet is in a side room, you might be able to dust a larger area and stay out of the room for a few days. Diatomaceous earth is not intended for use on upholstery or mattresses, where it can irritate human skin. However, a thin layer around the legs of furniture will affect any insects that crawl up onto the bed or couch. This won't stop the insects from reaching the furniture, but it will expose them to DE on the way and (hopefully) kill them a few days later. Diatomaceous earth is more effective in dry environments.Run a dehumidifier in the room if you have one. A cross-breeze can also help, but avoid pointing fans where they could blow away the powder. As long as you aren't kicking up dust or coughing (which shouldn't happen with proper application), there's no need to remove the diatomaceous earth. It remains effective as long as it stays dry, and often takes a week or more to start killing insects. Since the insects may have laid eggs by then, leaving on the diatomaceous earth for several weeks will help prevent a rebound. It's hard to predict how effective the DE treatment will be. An insect population in one neighborhood may even be more resistant than the same insect species somewhere else. Instead of waiting to see how it goes, attack the insects with multiple treatments at once. Find out about more treatments for bed bugs, cockroaches, carpet beetles, or fleas. Diatomaceous earth is very hard and can quickly ruin a normal vacuum's filter. A normal vacuum might be fine for a single, light application, but a filterless vacuum or a shop vac are better choices if you plan to apply the DE multiple times. There is no hurry to remove DE from your carpet unless you applied too much (leaving visible piles of dust). Just keep the proper tools in mind so you don't damage your normal vacuum cleaner during regular carpet cleaning. As long as DE stays dry, it can remain effective for months or even years. If you can lift your carpet, consider leaving a thin layer of DE underneath the edges, where it won't get kicked up. It's best not to leave DE out in households with pets or young kids.
Dust a fine layer onto carpet edges. Dust around furniture legs. Keep humidity down. Leave in the carpet as long as needed. Use other pest control methods at the same time. Remove the DE with a filterless vacuum. Consider leaving DE under the carpet edges.