Family or close friends can be a boon or a barrier in school. They can help provide needed confidence, social inclusion and make going to school fun. They can also be a source of stress, keep the child from broadening his social circle or be a distraction.
While I would generally see that the upside trumps the risk here it really depends on one thing:
How is their relationship?
Does your son like this cousin, are they good friends? Would he want to be in one class with his cousin or not? Do you feel the cousin is a generally good influence or do you suspect an unhealthy influence?
These are only questions you can answer but they should answer your question for you.
To add some theoretical underpinnings /examples in most schools in Germany class composition is done with the express goal of bringing kids that already know each other together. If you went to the same Kindergarten, live in the same neighborhood or are related schools will generally try to keep you together thinking this is best for the kids. So from this you can see that the question probably isn't "Should they be in the same class?" but "why shouldn't they be in the same class?".