Maniac is happy at the end of Chapter 12 because he feels like he finally has a home.
Maniac Magee desperately wants to belong somewhere. Orphaned at three, he lived for the next eight years in a highly disfunctional situation with his "nearest relatives, Aunt Dot and Uncle Dan". Aunt Dot and Uncle Dan hated each other, but stayed together because their religion forbade divorce, but they never talked to each other nor shared anything together. When he was about eleven, Maniac could not stand this absurd situation any longer, and he ran away, never to return (Chapter 1).
No one knows what Maniac did immediately after he disappeared, but after a year, he turned up two hundred miles away, in Two Mills. He lived for awhile among the animals at the zoo, and then he was fortuitiously befriended by Amanda Beale, who took him home with her. When the Beales discovered that Maniac had no home, they insisted that he stay with them. Before Maniac goes to bed that first night at the Beales', he stands outside on the front porch and just gazes "at the three cast-iron digits nailed to the door frame: seven two eight". He stares at the numbers, smiling, because "Maniac Magee finally had an address", signifying that, for the present at least, he has a home (Chapter 12).