takes command of the aircraft when the assigned Captain is resting. Does the IRO log PIC?
This gets debated ad nausem, being PIC (part 1) has nothing to do with logging PIC (part 61.51). If you are the sole manipulator and rated you can log PIC, this includes a F/O flying a RJ flight from Mooseballs Wyoming to Pigsnuckle Arkansas. 99.9% of the airlines will not accept this for employment purposes (and why they specifically state this on their apps as it is in contravention of how the FAA views it) but as far as the FAA is concerned that is how it works. There are numerous rulings from FAA Chief Counsel clearly stating this (plus close to 9000 posts on these forums).
ATP who signs for the plane logs everything even when he is sleeping.
Everyone else logs when they occupy a crew member station.
Do some searches on the topic and you will find all the supporting rulings and FAR's.