Shifts in work schedules test humans’ capacity to be flexible in the timing of both work and sleep. Honeybee, Apis mellifera, foragers also shift their work schedules, but how flexible they are in the timing of sleep as they shift the timing of work is unknown, despite the importance of colony-level plasticity in the face of a changing environment. We hypothesized that sleep schedules of foragers are not fixed and instead vary depending on the time when food is available. We trained bees to visit a food source made available for several hours in the early morning (AM) or several hours in the late afternoon (PM), then monitored their sleep behaviour for 24 h after training, specifically comparing their sleep during the AM and PM periods previously designated as training periods. Following AM training, honeybee foragers slept more during the afternoon than during the morning, but following PM training, the same bees ‘slept in’ the next morning, and so slept more in the morning than in the afternoon. Although foragers did not change the total amount of time devoted to each of their behaviours (including sleep), the timing of their sleep did change. Thus, plasticity in timing of foraging was matched by plasticity in timing of sleep. The apparent correlation between the timing patterns of foraging and sleeping demonstrates temporal plasticity of sleep under ecologically realistic conditions in an invertebrate. Testing how shift work affects the health and performance of honeybees may shed light on the role of sleep in a nonhuman social animal.