When taking the contents out of a lamp and putting them back in there is a risk that the wax will start to stick to the globe if the globe is not cleaned properly. With the bottle empty, use Dawn dish soap and lots of shaking, refilling and dumping is usually enough to clean out a lamp. It also helps to put a paper towel in the bottle while doing this. You might also find some sort of stick and attach a brush or sponge to wipe the sides down as well. I have used a wooden skewer with a Magic Eraser rubber-banded to it to swipe down the inside of the lamp with great success.
When putting the contents back in, some have had success by coating the globe with a surfactant (bubble soap, dish soap, GooKit surf) first, swishing it around and then pouring it out, leaving a thin coating behind.This coating can help the wax not stick to the sides of the globe.
Sometimes this is not enough. If the lamp has been ran for too long and the wax has been burnt up, you may need to take an extra step. Since wax is a petroleum product, paint thinner works very well to dissolve the wax. You will need to let the lamp soak for 24 hours to make sure the hardest, crustiest, burnt-on wax is dissolved. Use a bottle brush and clean the inside surface of the glass as best as possible. Simply soaking the lamp is not going to be enough.
If your lamp started sticking on its own, it may not be possible to fix it. Most USA lamps can be fixed by following the above steps, but Chinese-made lamps can have bad formula and will stick no matter what. There is also the chance that the surface on the inside of the globe if rough and no amount of cleaning will be able to solve that.