Without seeing them, it's hard to say. Could be a leak, could be mold, could be mold caused by a leak.
If there's no vapor barrier or there's no insulation in that area, it could be condensation wetting the area. Probably lots of other things.
One co-worker ended up removing 50# of wax and honey from a hive that ended up in the attic. The honey stained the ceiling. Could be something that died in the attic. You'd need to go up there and poke around.