The wax "lava" in lava lamps flows upward and back down because the wax and the water solution is closely balanced in density and buoyancy. The heated wax is lighter than the saline water solution, but after cooling and contraction at the top of the lamp bottle becomes denser again. Two very common problems that come up with a lava lamp are cloudiness in the water and "lava" that has stopped flowing. Fortunately, decades of trial and error since the lava lamp was invented in the '60s has zeroed in on a handful of solutions that have proven successful.
Decide whether the lava lies flat or is shaped like a dome. If the latter, then the lava is overheating, and turning off the lamp for two hours may solve the problem. Keep in mind that the lamp shouldn't run for more than 10 hours at a time. If instead the wax is melted but lies flat, then check the bulb underneath the glass globe. It may be dead or dying.
Replace the bulb with the same wattage, if you find the bulb is defective. However, if you find that the bulb was fully functioning, replace it with a higher wattage. If this doesn't suffice, move on the to the next step.
Assess the lamp's surrounding, which could be the source of the trouble. The lamp should be operated between 20.6 and 23.3 degrees Celsius. Don't operate it on a TV or near a radiator or air conditioner. Don't set it in the sunlight. That would also make the coloured liquid turn clear. If this doesn't solve the problem, go to the next step.
Run the lamp for four hours to heat it up fully. Remove the globe from its stand, protecting your hands with oven gloves. Place it on a flat surface and rotate it slowly for a minute or two, to break up the wax's surface tension a little. Return it to the globe and let it heat up for an hour. If that fails, replacement of the liquid is likely in order. See the section below for details.
Unplug the lamp and let it cool for two hours. Unscrew the cap and pour out the liquid, leaving the large solid wax ball at the bottom in the bottle.
Fill the lamp with distilled water, but don't swirl it around or shake it. The wax at the bottom is fragile. Pour the water out. Repeat a few times.
Fill the lamp up with distilled water, leaving a two-inch air gap at the top. Do not put on the cap yet. Place the globe on its stand and turn the lamp on for an hour.
Microwave a drinking glass of distilled water for 10 to 20 seconds. Dissolve as much pickling salt or Epson salts in it as you can. Swirling is allowed in this case since no wax is involved.
Dip a straw one inch down into the saline solution and put a finger on the open end to hold it in place in the straw. Drop the inch of solution into the bottle once every 10 minutes. Let it diffuse through the bottle on its own instead of mixing it in. Repeat until the lava first rises to the top of the bottle.
Add a small drop of liquid dishwashing liquid and two drops of food colouring to match the wax's colour. Screw the cap back on and you're done.
Don't shake the lamp at any time. This leads to clouding of the water with wax particulates.