Purpose Animal bedding, a mixture of straw and manure, could be used as a feedstock for bioenergy production, but its heterogeneity poses new challenges in its use in biorefineries. We have investigated the origin of this heterogeneity and quantified it, and discuss its impact on bioenergy production. Methods Samples were collected from the bedding at different points and depths and analysed by first separating the manure from the straw by means of washing with water, and then determining the chemical composition of the liquid and solid fractions. Results The results supported our hypothesis that animal bedding behaves as a combination of several layers at different stages of degradation. Analysis revealed that the layers with higher organic content in the manure exhibited a poorer performance during the washing, since the residence time in the barn alters the washing profile of the organic fraction in the manure. It was also found that the variability in the composition of animal bedding was much greater than in other agricultural feedstocks: the manure content in animal bedding varied from 26 to 41%, and the content of fermentable carbohydrates varied by 20%. Total carbon and total nitrogen analyses showed that these changes in composition also affected the C/N ratio of the material, and thus its suitability as a feedstock for anaerobic digestion. Conclusions This implies that the residence time in the barn affects not only the heterogeneity of the properties of animal bedding, but also the best way to process it in a biorefinery.