In no way does it sound like a ball bearing rolling around so this may or may not apply to your vehicle.
Popping sound on roof.
Step back and look for puckers and out of place roof tiles.
Take a look around your home and note any signs of gutters pulling away from your roofline.
If you notice excessive or unusually loud cracking and popping sounds after mother nature has piled frozen precipitation on your roof it may be wise to investigate further.
This movement creates the popping noise.
As the lumber expands it moves and rubs against other pieces of wood that aren t moving at the same rate.
Bring your vehicle in to your local dealership and refer to tsb 0151013.
The sun hits your roof and heats it up.
The wood warms during the day losing moisture and shrinking slightly.
The tsb involves installing shims in between spot welds to the sunroof reinforcement structure.
I would guess that you are having the same type of issue caused by wind uplift which could be more pronounced on a flat roof than a gable.
As the lumber expands it moves and it will rub against other pieces of wood that aren t moving at the same rate.
The noise you hear is not from settling but from wood framing members moving in relation to one another.
The sun hits your roof and heats it up.
The gable has an opposite truss pushing back whereas the flat roof truss does not.
This repair is covered by the basic 3 36 warranty.