The Outer Limits - Season 5 Episode 3 Small Friends
Overview: When he was young, Gene Morton killed a man who tried to steal the credit for his brilliant research. Now working on a prison assembly line fixing the busted tape decks of fellow inmates, his chances at parole have been sabotaged by his own honesty and sense of guilt. Although it's a lonely life, late at night, after lights-out, Gene brings out his small friends, a swarm of microscopic machines that he made from prison scrap and keeps in a matchbox.