Background Few migraine preventive agents have been assessed in a pediatric population. We evaluated the safety and efficacy of cinnarizine and sodium valproate for migraine prophylaxis in children and adolescents. Methods We carried out a randomized double-blind placebo-controlled trial in the Children’s Medical Center and Sina hospital, Tehran, Iran. Eligible participants were randomly assigned in 1:1:1 ratio via interactive web response system to receive either cinnarizine, sodium valproate, or placebo. The primary endpoints were the mean change in frequency and intensity of migraine attacks from baseline to the last 4 weeks of trial. The secondary endpoint was the efficacy of each drug in the prevention of migraine. The drug was considered effective if it decreased migraine frequency by more than 50% in the double-blind phase compared with the baseline. Safety endpoint was adverse effects that were reported by children or their parents. Results A total of 158 children participated. The frequency of migraine attacks significantly reduced compared to baseline in cinnarizine (difference: −8.0; 95% confidence interval (CI): −9.3 to −6.6), sodium valproate (difference: −8.3; 95% confidence interval: −9.3 to −7.2), and placebo (difference: −4.4; 95% confidence interval: −5.4 to −3.4) arms. The decrease was statistically greater in cinnarizine (difference: −3.6; 95% confidence interval: −5.5 to −1.6) and sodium valproate (difference: −3.9; 95% confidence interval: −5.8 to −1.9) arms, compared to placebo group. Children in all groups had significant reduction in intensity of episodes compared to baseline (cinnarizine: −4.6; 95% confidence interval: −5.2 to −4.0; sodium valproate: −4.0; 95% confidence interval: −4.8 to −3.3; placebo: −2.6; 95% confidence interval: −3.4 to −1.8). The decrease was statistically greater in cinnarizine (difference: −2.0; 95% confidence interval: −3.2 to −0.8) and sodium valproate (difference: −1.5; 95% confidence interval: −2.7 to −0.3) arms, compared to the placebo group. Seventy-one percent of individuals in the cinnarizine group, 66% of cases in the sodium valproate group, and 42% of people in the placebo arm reported more than 50% reduction in episodes at the end of the trial. The odds ratio for >50% responder rate was 3.5 (98.3% confidence interval: 1.3 to 9.3) for cinnarizine versus placebo and 2.7 (98.3% confidence interval: 1.0 to 6.9) for sodium valproate versus placebo. Nine individuals reported adverse effects (three in cinnarizine, five in sodium valproate, and one in the placebo group) and one case in the sodium valproate group discontinued the therapy due to severe sedation. Conclusion Cinnarizine and sodium valproate could be useful in migraine prophylaxis in children and adolescents. Trial registration: IRCT201206306907N4.