It's not a good idea. While there's no known risk from exposure to unleaded, water-based indoor (latex) paints, all paints contain chemicals that emit fumes. Since only a few of these chemicals have been studied for their safety in pregnancy, it's best to let someone else play Picasso. Oil-based paints and paint thinners contain more solvents (which have been linked to an increase in miscarriage and birth defects) than their water-based counterparts, so choose a latex paint and ask your painter to keep the area well ventilated.
In fact, according to the U.S. Environmental Protection Agency, pregnant women should avoid newly painted rooms (and their harmful odors) for at least two days after the job is done. If existing paint needs to be removed from the outside of your home, hire someone to do it and avoid the area until the job is completed for the day. Be especially careful if your home was built before 1980. Homes like this may have paint that contains lead, which can raise your risk of miscarriage or developmental delays in your infant.