'Sleep demons' have plagued our dreams throughout the centuries, but the explanation could be medical