Self tanners have not been studied very well when it comes to safety during pregnancy. There is no proof of self tanners being harmful for either the mother or the baby. However, it is definitely considered safer than lying in the sun for tanning since there is a potential risk of over heating. Over heating during the first trimester of pregnancy can cause defects in the neural tube. There is also a potential risk from the ultraviolet rays that cause skin cancer.
During pregnancy, there is a also a chance of dehydration due to excessive heat. This is harmful for both the mother and the growing fetus and therefore, it is best to avoid sunlight. Therefore, if you are planning to be in the sun due to any reason, make sure that you have a good supply of liquids and are wearing sunscreen.
If you have been in confinement and feel that you need a tan, discuss the use of self tanners with your doctor. It is however advised that you temporarily use bronzers instead of tanning chemicals.