Can a pilot change out of uniform during breaks on a long flight?
The answer depends a lot on the jurisdiction and airline, but Yes, pilots can change out of uniform during breaks on long flights.

A 15 hour flight would have 4 pilots who are all in the flightdeck for takeoff and landing but then divide roughly 14 hours of cruising time into equal rest breaks.

Typically 2 pilots will be paired together and take breaks at the same time. At some airlines they would have 2 pilots take a 7 hour break and then switch off. At other airlines they  take two 3 1/2 hour breaks. 

Each 2 person crew would be off the flight deck for half of the 14 hours spent at cruising altitude (15 hour flight) I find most crews prefer two shorter breaks as opposed to one long break. With a 3 person crew they would have each pilot take 1/3 of the cruising time as a break. 

Most airlines operate with one main crew who does both the takeoff and Landing. This is because the second crew is generally less qualified. In some cases the "augment" pilots are only licensed to operate during the cruise portion of flight. Some airlines will operate with two fully qualified Captains and two fully qualifed First Officers and they can divide the takeoff and Landing between the two Crews.

Most pilots change out of uniform during their breaks. Some airlines require the pilots to wear their hat and tie when they leave the flight deck.  Others are much more relaxed. 

I have seen pilots in T-shirts enter and exit for breaks.