[header] How to get a baby with an ear infection to sleep [title] Get a prescription for your child. [step] When you notice that your child is in pain, contact your pediatrician right away. He or she will be able to diagnose the ear infection and prescribe medication that will help your child to overcome the infection. 
Your pediatrician will most likely prescribe antibiotics, and possibly some pain medication. Follow the doctor's orders when giving your child the medication.