Stay in bed, drink your fluids, and cross your fingers. Either the baby will stick or the baby will go, it is up to the baby at this point, but you can calm the uterus from contracting (if it is having contractions for another reason) by keeping hydrated and not walking. In other words, a miscarriage is something that either happens or it doesn't, for reasons of the embryo itself. If the contractions are from a real miscarriage, you won't be able to stop them no matter what you do.