In my experience, cats are pretty good determining whether something they've caught should be eaten - one of the cats I grew up with was an avid hunter but while he played with a rat that had eaten poison, he didn't try to eat it. The other cats I've lived with haven't been as eager to hunt but none of them ever tried to eat anything poisonous although they'd eat bugs quite cheerfully (including crunching down on grasshoppers).
If you're not poisoning the bugs that get in, there shouldn't be a problem - but keep an eye out for venomous spiders that are common where you live. Your cat probably won't try to eat those, but hunting them could get the cat bitten, with ugly consequences.
Update for those who object to my offering the anecdotal evidence of having spent most of my 47 years living with at least one cat and those who think my lack of concern about cats eating insects is problematic:
- A web search did not turn up any definitive answers as to whether it's generally safe or not. There is a lot of evidence that insects supplement the diet of feral cats
- The same web search included evidence that cats are at much greater risk from being poisoned by pesticides than they are from eating the pests the home owner might be trying to eliminate
- Depending on the biota exactly where you live and your own cat's tolerances, results may vary. I had thought this was something that didn't need to be stated outright. Apparently I was wrong.
- Something that won't bother a healthy adult cat can be a problem for a kitten. Again, I thought this was too obvious to need mentioning, but apparently I was wrong.
- Another piece of anecdata - despite having been an eager bug-hunter in Australia, my 18+ year old cat has never attempted to chase any of the handful of US bugs the search I ran indicated could be harmful (love bugs - which were impossible to keep out of the house in one of the places I lived). She went after "safe" insects (ants which hadn't been poisoned, mostly, and some flies and mosquitos) until she got too old for that sort of young cat nonsense.
- My brother-in-law (who is a vet in Australia) has never attempted to keep any of the family cats away from insects. If a vet in the country with more lethal poisonous critters than anyplace else in the world thinks cats aren't likely to have problems eating bugs, I'm not going to argue with him.
- There will always be exceptions. The world isn't safe and much as we'd like to we can't make it totally safe for us or for our pets. The exceptions may be tragic, but I'm not going to try to keep my cats away from all insects on the off-chance that one of them would react badly to an insect they killed and ate. That would take watching them every minute of every day, and my husband and I both work and need to sleep now and then.