They probably could, if enticed. Like, by moist wood suitable for
housing and food.
Depending on where you are, and thus the species of termite that you
might encounter, your roof ridge is kinda distant from the soil, where
some species need to maintain "connections." Again, depending on
unspecified location, things get a little hot and dry up on roof ridge,
How do you know they're termites, and not ants?