For diurnal nonhuman primates, shifting among different sleeping sites may provide multiple benefits such as better protection from predators, reduced risk of parasitic infection, and closer proximity to spatially and temporally heterogeneous food and water. This last benefit may be particularly important in sleeping site selection by primates living in savanna‐woodlands where rainfall is more limited and more seasonally pronounced than in rainforests. Here, we examined the influence of rainfall, a factor that affects food and water availability, on the use of sleeping sites by anubis baboons (Papio anubis) over two 13‐month study periods that differed in rainfall patterns. We predicted that during wet periods, when food and water availability should be higher, the study group would limit the number of sleeping sites and would stay at each one for more consecutive nights than during dry periods. Conversely, we predicted that during dry periods the group would increase the number of sleeping sites and stay at each one for fewer consecutive nights as they searched more widely for food and water. We also predicted that the group would more often choose sleeping sites closer to the center of the area used during daytime (between 07:00 and 19:00) during wet months than during dry months. Using Global Positioning System data from collared individuals, we found that our first prediction was not supported on either monthly or yearly timescales, although past monthly rainfall predicted the use of the main sleeping site in the second study period. Our second prediction was supported only on a yearly timescale. This study suggests that baboons’ choice of sleeping sites is fluid over time while being sensitive to local environmental conditions, one of which may be rainfall.