A head position monitor for polysomnography.