There are certainly scenarios where you should consider the police to be your adversary and enforce every right you have to its fullest extent, but choosing your battles is just as important. The police have far more rights to detain a juvenile compared to an adult, and an unaccompanied 13 year old with a backpack at 5am is out of the ordinary. The officer was already starting from a place with a reasonable assumption that the child may be lost or a runaway, in which case he can probably already take him back home (or to the station for CPS to talk to if he's completely uncooperative).
Allowing a quick search to confirm that you're just pursuing a harmless hobby and are not putting yourself in any danger or likely to be reported missing a couple of hours later, seems like the easiest and fastest way to deal with that particular encounter.