From :
www.storknet.com/cubbies/childbirth/exah2.htm
Castor oil to encourage the onset of labor. It is thought to act in one of several possible ways. By creating strong and spasmodic cramps of the intestines (which lie around and above the uterus at the end of pregnancy) it might cause a reflexive cramping and spasms of the uterine muscle, which might then turn into labor. It might work by having a dehydrating effect, and thereby causing uterine irritability from dehydration, and then labor ensues. It might stimulate the release of prostaglandins from the inflammation of the intestines. Or it may have no real connection to the onset of labor at all, and be merely an unpleasant placebo, and the reported effects simply coincidence, since most women who take it are at the end of pregnancy anyhow and will eventually go into labor.
The effectiveness of castor oil to encourage the onset of labor is questionable. It is generally considered safe, although there are some who believe that it increases the risk of meconium passage in the infant. It has not been well studied, which is surprising considering how long this old remedy has been in use. It seems to be relatively safe, although there is concern that if it does in fact work to induce labor, does it carry the risks of other methods of induction? (These risks include fetal distress from too strong contractions, increased risk of uterine rupture especially in a scarred uterus, unintentional prematurity of the baby, increased pain level for the mom, and a few other risks). Are the benefits such that the risks are outweighed? I would suggest that any pregnant woman who is considering trying to induce her own labor by this or any other method, including herbs, be sure that her baby is ready to be born. Sometimes there are reasons why labor does not start when we think it should, including a baby that hasn't gotten into a good position to be born from. I also highly recommend that the pregnant woman consult with her prenatal and birth care provider (midwife or doctor) in advance of trying this.
If you take castor oil, expect to develop severe diarrhea and cramps when it kicks in. Uterine contractions often follow, and occasionally develop into labor. Hopefully the last of the castor oil will be expelled before the time comes to push out the baby, and the diarrhea won't have made you too sore for comfortable pushing. Bedtime is a common time when people take this, but then you might end up in the bathroom all night, and be tired if labor starts in the daytime. One person I know suggests setting your alarm for 4 in the morning, taking the dose, and then going back to sleep until the cramps start.
Personally, I would have to be pretty desperate to take castor oil. If one of my pregnant ladies really wants to take it, and she is more than 39 weeks pregnant, I will give her the recipe. I have not seen it be very successful. Most of those for whom it works are already 2 - 3 cm dilated and have been having contractions (but not labor) for weeks.