Perhaps he;s on overnight duty either as the XO or with the XO (there is an enlisted man working the night with the XO.)
On duty...you boss controls you. Off duty, do what you want. Has that ever been different?
Back in the day, I don’t think I would have said anything about a political book, but no one was ready Penthouse or Playboy on duty.
Its a judgement call. In this case, probably bad judgement, but its still the bosses (CO’s) call.