A mother cat can have a miscarriage for several reasons. The ones I am familiar with are: malnutrition and disease.
Make sure your kitty has a well balanced nutrition, a temperature wise spot to nap in (55-90 Farenheit degrees), plenty of water to drink (she needs to build amniotic fluid for her kittens) and NEVER feed her MILK, cats are very allergic to milk.
My husband's aunt fed her pregnant cat milk and eventually she developed complications in her pregnancy and had a miscarriage. All kittens perished. :(