Think about the needs of the family of the deceased. The wake and the funeral are primarily for the family and friends of the deceased. It is important to support them in having the kind of service which will meet their needs. You could ask a family member whether they are expecting, or would be comfortable with children at the event. The length of the event and the expectations for behavior of the attending children should be considered.
Young children have a hard time sitting still and being quiet for long periods of time.
They may need to sit near the door and take a break during the service. They might not be absolutely quiet. You and your child could bake muffins, make a card, or take flowers to the family. You could find a photograph of the friend and frame it for the family. In the end, the appropriateness of a child's participation in a funeral or wake depends on the expectations of the family of the deceased, your own family's beliefs and your child's ability to participate appropriately and benefit from the event.