You are allowed to do that, unless the activated bonus comes with a wagering requirement. If so, you need to fulfill the requirement first before making the withdrawal.