AbstractSpontaneous magnetic alignment is the simplest known directional response to the geomagnetic field that animals perform. Magnetic alignment is not a goal directed response and its relevance in the context of orientation and navigation has received little attention. Migratory songbirds, long-standing model organisms for studying magnetosensation, have recently been reported to align their body with the geomagnetic field. To explore whether the magnetic alignment behaviour in songbirds is involved in the underlying mechanism for compass calibration, which have been suggested to occur near to sunset, we studied juvenile Eurasian reed warblers (Acrocephalus scirpaceus) captured at stopover during their first autumn migration. We kept one group of birds in local daylight conditions and an experimental group under a 2 h delayed sunset. We used an ad hoc machine learning algorithm to track the birds’ body alignment over a 2-week period. Our results show that magnetic body alignment occurs prior to sunset, but shifts to a more northeast–southwest alignment afterwards. Our findings support the hypothesis that body alignment could be associated with how directional celestial and magnetic cues are integrated in the compass of migratory birds.