We investigate the tunneling of ultracold atoms in optical traps by using the path-integral method. We obtain the decay rate for tunneling out of a single-well and discuss how the rate is affected by the level splitting caused by the presence of a second adjacent well. Our calculations show that the transition through the potential barrier can be divided into three regions: the quantum tunneling region, the thermally assisted region and the thermal activation region. The tunneling process is found to be a second-order transition. We also show that level splitting due to tunneling can increase the tunneling rate.