Describe herein are medical foods, pharmaceutical compositions, methods of compounding them, and method of using them for the treatment of developmentally-based neuropsychiatric disorders including particularly autism, ADHD, and persistent developmental disorders. The medical foods and pharmaceutical compositions typically include a methylglycine compound or precursor compound and an acetylcysteine compound or precursor compound. These methylglycine and acetylcysteine compounds may be prepared for sustained release or delivery. In some variations, a method of treating a developmentally-based neuropsychiatric disorder includes first determining if a patient is at risk for such a disorder by examining either or both phenotypical and genotypical biomarkers. The biomarkers may be used to tailor the dose to be delivered by the medial food or pharmaceutical composition.