There is nothing illegal about the practice of a doctor prescribing off label use of a drug for his/her patients. It is actually an essential practice for veterinarians . The breaking of the law enters into play when the pharmaceutical company who manufactures the drug promotes the use of it for conditions other than those which FDA granted its approval for.
Many of the drugs contained in the Physicians' Desk Reference are not approved for use in children under the age of 6 years. Most times the reason why they aren't is because the drugs have not been subjected to extensive testing in small children, but in adults and children 6-12 only. When the need to use a drug not approved for small children is warranted, the physician simply goes ahead and either administers or prescribes the drug off label. This happens many hundreds of times a day, legally.