Some T-Mobile branded iPhones are suffering from blue screens and random restarts
Some T-Mobile branded iPhones are experiencing a blue screen before restarting
One Reddit user who spoke with T-Mobile support staff, wrote that "the sense I got from the technician is that a) they suspect memory problems, and b) they're getting a lot of calls about it." T-Mobile is recommending that its subscribers experiencing this problem should do a hard reset. If that doesn't help, the carrier suggests that you clear old text messages and do a factory reset via iTunes.
One person affected by the issue was able to end it by disabling Wi-Fi calling. If you want to try that before a factory reset, go right ahead. Trying to find a cure without having to go through that headache seems like it would be a goal to aim for.