Mechanisms of sleep apnoea and their effects on cognitive flexibility