From Leopard Gecko Wiki
Cause of Prolapse
Occasionally the male gecko hemipenis (one or both) or the female reproductive tract will prolapse. Prolapse occurs when a piece of organ or tissue is sticking out from the body and can't be reinserted naturally. The only place (usually) that you find prolapse in leopard geckos is around the the vent area. This is usually caused by mating (females), egg-binding, parasites or the leopard gecko straining to push out something hard. This is usually caused by impaction by sand or food which is too big causing the gecko to have to strain to force it out.
Curing a Prolapse
One of the methods that you commonly find on the internet to remedy this is soaking the leopard gecko in a warm solution of dissolved sugar and water. The sugar solution reduces swelling and aids in retracting the prolapse by making it easier to reinsert. Preparation H, designed to shrink hemorrhoids can also be used. If this isn't successful it's important to seek help from a qualified reptile veterinarian. Don't try and force a prolapse to retract as it doesn't always work and can make the prolapse worse. Keep a leopard gecko with a prolapse on a non-particulate substrate such as paper towels and keep the prolapse moist with warm water. You should NEVER attempt to reinsert a prolapse back into your leopard gecko as it can harm your leopard gecko internally.