Actually, it can matter with a heat pipe, because they use basic thermodynamics (they usually use a fluid inside the pipe to transfer the heat away from the CPU-hot liquids rise, cold liquids sink) to do their job.
Not so, I'm afraid.
Heatpipes have nothing to do with gravity nor liquid density.
...
Again: heatpipe orientation does not affect it's ability to cool. Read the wiki entry to see why in detail.
I have a heat pipe that shows I can mount it a few ways, but not in others. With other (aka high quality) heat pipes orientation might not matter, but this cheep one does.
And the wiki doesn't say orientation doesn't matter, but that capillary forces help move the liquid. If the capillary force can't overcome gravity, then it wouldn't work. Since the wiki also says there are different ways of manufacturing the wicks that act as capillaries, it should be noted that different wicks have higher and lower capillary forces, with one kind of wick not able to overcome gravity.
Most heat pipes probably are able to work upside down, but definitely not all.
BTW, my CPU heat pipe cannot work on an upside down motherboard or in two of the four orientations with a vertical motherboard (those with the pipes vertical). That's what I get for buying cheap knock offs. [shrug]
edit: spelling