The first medication for obstructive sleep apnea has been approved by the US Food and Drug Administration (FDA).