In NetHack, this potion causes you to float in the air for 250 to 299 turns (blessed) or 10-149 turns (uncursed or cursed). The blessed potion allows you to land at will.

Additionally the cursed potion causes you to hit your head on the ceiling for 1d10 points of damage. You only take 1 point if you are wearing any type of head armor. If you are standing on an up staircase or ladder when this potion is quaffed, you will go to the next floor.

Unless the potion is blessed, there's no way to stop levitating before it runs out, unless you float over a sink (the DevTeam's puns are sickening, aren't they?).