What causes the temporary dizziness when you get up after a long time sitting or lying down?

Hypotension. What you are describing is orthostatic hypotension or postural hypotension. When you get up, your blood pressure dropa and there is a delay in recovery to normal. Mild symptoms, lasting a few seconds, is not usually a cause for concern and does not need to be treated. If it is lasting a long time, see your primary doc for evaluation and discussion of treatment options.