I had it happen to me but it went away pretty quick once the interior temp of the car warmed up. Didn't have anything to do with the sun.
It's the only rattle I've had and it's only happened once. Definitely something I'm paying attention to if it happens again.