Why Are There Gnats in My Bed? What Those Tiny Flies Are

By the Pest Control Brief editorial team Published November 24, 2026 10 min read
A bright bedroom with a bed and a large potted houseplant on the floor beside it, a window with a fine mesh screen, morning light, no insects
AI-generated illustration.
Quick answer

Gnats in your bed or bedroom are usually fungus gnats breeding in an overwatered houseplant, fruit flies from food or drinks left in the room, or drain flies from an en suite drain. If you are being bitten at night, they are not those three: UC IPM and Kentucky entomologists say fungus gnats, fruit flies and drain flies do not bite people. Night bites point to biting midges (no-see-ums), mosquitoes or bed bugs. Find the source and the gnats usually stop within one or two of their short life cycles.

A gnat does not choose a bed because of the bed. UC IPM describes fungus gnats as weak fliers that usually don’t move around much indoors, so a steady trickle of them in one bedroom means the breeding site is in that room or the bathroom next to it. The table below sorts it by what you can see.

What you are seeing, and where it breeds

What you notice Bites? Most likely fly Where it is breeding First fix
Slow black flies with long legs, near a window or lamp, rising from a plant pot when you water No Fungus gnat, 1.6 to 3.2 mm Top 1 to 2 inches of wet potting soil Let the soil surface dry; yellow sticky cards in the pot
Tan flies with red eyes, round a glass, mug, bin or snack wrapper No Fruit fly, about 3 mm Fermenting food or drink residue Remove the residue, empty the bedroom bin
Fuzzy, moth-like flies resting on bathroom walls by the en suite No Drain fly, 2 to 4 mm Organic film inside a sink, shower or floor drain Scrub the drain film out with a brush
Almost invisible, sharp bites at dusk or night, near the coast or wetlands Yes, females Biting midge (no-see-um), 1 to 2 mm Outdoors: marsh, mud, wet soil; they come in through screens Close windows at dusk; fan; finer screen
Itchy bites in rows or clusters on waking, no flies seen Yes Not a gnat: possibly bed bugs Mattress seams, headboard, nearby furniture Inspect the bed with a torch
Tiny pale wingless specks on bedding or books No Not a gnat: booklice, about 1 mm Mould on damp paper or plaster Lower the humidity

Sizes compiled by The Pest Control Brief from UC IPM Pest Notes 7448, University of Kentucky ENTFACT-657, UF/IFAS EENY-349 and UC Davis Bohart Museum Note 62.

Tiny flies and lookalikes found in bedrooms, adult lengthOnly the biting midge, among the flies, bites people, and it is the smallest. UC IPM gives fungus gnats as 1/16 to 1/8 inch (1.6 to 3.2 mm) and Kentucky gives 3 to 4 mm, so the bar spans both; the bed bug value is Kentucky's 3/16 inch (4.8 mm).Booklouse (not a fly)1 mmBiting midge (no-see-um)1 to 2 mmFungus gnat1.6 to 4 mmDrain fly2 to 4 mmFruit fly3 mmBed bug adult (not a fly)4.8 mm012345mm
Tiny flies and lookalikes found in bedrooms, adult length Only the biting midge, among the flies, bites people, and it is the smallest. UC IPM gives fungus gnats as 1/16 to 1/8 inch (1.6 to 3.2 mm) and Kentucky gives 3 to 4 mm, so the bar spans both; the bed bug value is Kentucky's 3/16 inch (4.8 mm). Source: UC IPM Pest Notes 7448; University of Kentucky ENTFACT-657 and 636; UF/IFAS EENY-349; UC Davis Bohart Museum Note 62.

Size alone will not sort them: every fly in that chart overlaps at 1 to 4 mm. Where they gather tells you more, which is also the thrust of our guide to what attracts each kind of gnat indoors and out.

A yellow sticky card pushed into the soil of a potted houseplant, close view, no text
Yellow sticky cards in plant pots show whether fungus gnats are breeding there. AI-generated illustration.

The usual culprit: a houseplant in the bedroom

Bedrooms collect houseplants, and houseplants in rooms with little direct sun dry out slowly. Fungus gnat females lay eggs in moist organic debris or potting soil, and Colorado State University Extension says each female may lay up to 200 eggs during her 7 to 10 day life. At 75°F, UC IPM gives about 3 days to hatch, about 10 days as a larva and about 4 more before the adult emerges, so a pot that stays wet produces a fresh wave every two and a half weeks.

UC IPM also explains why they end up on the bed: adults are attracted to light, so you first notice them flying near windows, and a bedside lamp or a phone screen at night is the brightest thing in the room. They are weak fliers and, in UC IPM’s words, usually don’t move around much indoors, so the pot is rarely far away.

The potato test

To confirm a pot is the source, push 1/4 inch slices or wedges of raw potato into the soil, cut side down. Colorado State says the larvae migrate to the potato and start feeding within a few days; turn the slices over to look for larvae on the underside. UC IPM advises replacing the chunks after a few days in a pot. A pot with larvae is your answer.

Breaking the cycle

  • Water only when the top 1 to 2 inches of mix are dry, which is Colorado State’s advice, and empty saucers that hold water.
  • Cut yellow sticky cards into small squares and put them on sticks in each pot, as UC IPM suggests; they catch adults and show you which pot is worst.
  • Store open bags of potting mix sealed and out of the bedroom.
  • Repot a plant whose roots are soft and rotten in fresh mix.

UC IPM says adult fungus gnats don’t damage plants or bite people. That is why a pest control visit is rarely the answer here, a point our guide to fungus gnats and other houseplant pests makes at more length.

Why are there gnats in my bedroom without food?

Because the food is not food in the human sense. Kentucky’s ENTFACT-657 lists the breeding material for each small fly: fungus gnats need moist soil or decomposing organic matter, drain flies need the organic matter that obstructs sinks or shower drains, and fruit flies need fermenting food and other damp organic substances. In a bedroom with no snacks, that leaves three places to check:

  1. Plant pots, including a single pot on a windowsill, a terrarium or a vase of flowers with standing water.
  2. The en suite drain. Drain flies rest on the walls next to the bathroom sink or shower; pour nothing yet, just look at the walls near the drain.
  3. Forgotten residue: a water glass with juice traces, a wine glass, a fruit tea mug, a bin with an apple core, or a pet’s water and food bowl.

Fruit flies and drain flies have different fixes and different costs if it ever gets to that point; our page on telling fruit flies, drain flies and fungus gnats apart covers the drain scrub in detail.

A slice of raw potato lying on the surface of potting soil in a plant pot
A potato slice on the soil draws fungus gnat larvae to the surface where they can be seen. AI-generated illustration.

When they come in all at once in autumn

A sudden flush in September or October is common, and our analysis of iNaturalist records shows the timing. Common fruit fly records run at 192 to 268 per cent of their usual share of all US research-grade observations from September to November, against 12 to 21 per cent in March to June. Drain flies rise more gently, peaking at 152 to 156 in September and October.

When fruit flies and drain flies are recorded, by monthSeasonality index: 100 is the yearly average share of all US research-grade iNaturalist records. Fruit fly records climb to 268 in October, which matches the autumn surge people notice indoors; drain flies vary less across the year.JFMAMJJASONDCommon fruit flypeaks in OctoberDrain fliespeaks in October
When fruit flies and drain flies are recorded, by month Seasonality index: 100 is the yearly average share of all US research-grade iNaturalist records. Fruit fly records climb to 268 in October, which matches the autumn surge people notice indoors; drain flies vary less across the year. Source: The Pest Control Brief analysis of iNaturalist research-grade records, pulled October 2026 (b19 to b30 files).

These iNaturalist records show when people noticed and recorded the flies, not counts of infestations, but they match the autumn pattern people describe: windows still open, fruit ripening outdoors, and flies looking for somewhere to breed. If it is houseflies in numbers rather than gnats, the causes are different, and our guide to lots of flies in the house all of a sudden covers them.

Why are there gnats in my bedroom at night?

No bites: light is pulling them in

UC IPM notes that adult fungus gnats are attracted to light, so in a dark bedroom they head for the lamp, the laptop and the pillow next to the phone. Switching off the bedside light and leaving a light on in the hall or bathroom gives them a brighter target while you deal with the pot.

Bites: something other than a house gnat

The UF/IFAS profile of biting midges (EENY-349) says most species bite during dusk, night or morning, and adults are usually 1.0 to 2.0 mm long, about 1.5 mm on average for Florida’s 50 or so species. Only females bite. The same document states plainly that regular window screens do not exclude biting midges, and illustrates a midge next to standard screen mesh.

If you live near a salt marsh, mangrove or river and wake with itchy welts, close the windows from dusk to morning, when UF/IFAS says most species bite; our guide to no-see-ums and how to keep them out covers screening and repellents.

A high whine in your ear at night means mosquitoes, which breed in standing water rather than in the room; the steps for getting rid of mosquitoes in the house are different.

If no flies are visible at all and the bites appear in clusters or lines overnight, check the bed itself. University of Kentucky ENTFACT-636 gives adult bed bugs as about 3/16 inch long, reddish brown, oval and flat, and the EPA lists rusty or reddish stains, dark spots of excrement and pale shed skins as the signs. Our bed bug identification guide with every life stage at actual size shows what to look for.

Bite pattern alone is weak evidence of the culprit, as our page on why bite patterns are a poor guide explains.

A fine mesh window screen in a bedroom window with evening light behind
Biting midges are small enough to pass through standard window screen. AI-generated illustration.

Is it a gnat at all?

Several non-flying things get called gnats in a bed. Booklice are about 1 mm, pale and wingless, and the UC Davis Bohart Museum note says they feed on mildews on paper and thrive at 75 to 95 per cent humidity, so they appear on bedding, books and windowsills in damp rooms.

Fleas jump rather than fly and usually arrive with a cat or dog; our page on whether fleas can live in your bed covers them.

For mites, beetle larvae and anything else under 5 mm, the tiny bugs in the house guide sorted by colour and room is the quickest key.

Frequently asked questions

How can I get rid of gnats in my bedroom?

Find the breeding site first. Let houseplant soil dry in the top 1 to 2 inches, put yellow sticky cards in the pots, scrub the en suite drain with a brush and remove any fermenting food or drink residue. Fungus gnats go from egg to adult in about 17 days at 75°F, so expect numbers to fall over two to three weeks.

Can gnats lay eggs in your body?

The household gnats cannot. Kentucky and UC IPM describe them laying eggs in moist soil, fermenting food and drain film. Fly larvae in human tissue, called myiasis, is caused by other flies, and CDC says it is not common in the US and occurs mainly in tropical areas, with most US cases in travellers. Any concern about a wound should go to a doctor.

Can gnats bite you in bed while sleeping?

Fungus gnats, fruit flies and drain flies cannot; UC IPM and Kentucky ENTFACT-657 both say they do not bite. Female biting midges can, mostly at dusk, night and morning according to UF/IFAS, and they pass through regular window screen. Mosquitoes and bed bugs are the other common night biters.

Do gnats lay eggs in your hair?

No. The gnats found in homes lay eggs in damp organic material such as potting soil, rotting fruit or the slime inside drains, where their larvae can feed. Hair offers none of that. Insects actually living in hair are usually head lice, which have no wings; CDC guidance or a doctor can confirm.

Why are there gnats in my bed all of a sudden?

Usually a new or overwatered plant, a bag of potting mix opened in the room, or an autumn rise in fruit flies. Our iNaturalist analysis shows common fruit fly records at 192 to 268 per cent of their usual share from September to November. A sudden start with bites points to midges or bed bugs instead.

Sources

  • UC Statewide IPM Program, Pest Notes: Fungus Gnats, Publication 7448.
  • Colorado State University Extension, Fungus Gnats as Houseplant and Indoor Pests, Fact Sheet 5.584.
  • University of Kentucky Entomology, ENTFACT-657, Small Flies.
  • University of Kentucky Entomology, ENTFACT-636, Bed Bugs, M. F. Potter.
  • Burkett-Cadena ND, Cooper VM, Addae C, Buckner EA. Biting Midges, No-See-Ums Culicoides spp. UF/IFAS Featured Creatures EENY-349, 2025.
  • UC Davis Bohart Museum of Entomology, Information Note 062, Psocids/Booklice.
  • US Environmental Protection Agency, How to Find Bed Bugs.
  • Centers for Disease Control and Prevention, About Myiasis.
  • The Pest Control Brief analysis of iNaturalist research-grade records, pulled October 2026 (b19 to b30 files).
Got flies or pantry pests?Compare local quotes