I insulated the ceiling of an old goat shed once with styrofoam egg cartons. Staple the lid of the carton to the ceiling and then close the bottom to the lid. Next carton goes in right beside it. If you need more R value you can stuff the cartons.
That’s cool info about the goat shed. In the past I had used egg crate insulation not for temp control, but for room sound insulation to ward off street noises, etc.
Attached them to a large sheet of felt or cork board (also good for sound insulation) and hung them on the wall near the ceiling so the wall is covered.