I honestly think that the mother innocently gave her some sedative so that they could go out that evening. Maybe Madeline was a bit hyper that evening and didnt want to sleep. When they went back to the hotel room and found out that she had OD'd they panicked and come up with the whole story in about 30min. With her being a doctor, they might of thought that they wouldnt be able to say it was an accident, because the judge could argue that she knew that children shouldn't be taking such a drug and that she knew exactly what the risks were.