Technically, yes, you can agree to custody matter or support in a prenuptial agreement. The more important question here, however, is about enforceability. Will a prenuptial agreement that has an agreement as to custody and support be enforced? The answer is probably not. The entire agreement may not be voided if there are other aspects to it and there is a severability clause, but agreements as to custody and support have routinely been voided by the Courts.
The reasoning behind the non-enforcement of custody and support has two main facets: (1) best interests of the children involved and (2) ever changing life circumstances. A typical custody or support matter that was decided usually during the pendency of a divorce, is always modifiable if there is a significant change in circumstances. The number of ways in which this requirement can be met are as numerous as the stars. Someone could change jobs for instance. This could mean both a change in salary and a move to a different state. The custody agreement made when both parents are local will look very different from one that is agreed to when one is local and one lives 1,000 miles away. The support agreement may change because the salary of the party paying support changed or in the alternative, if the parent receiving support changed. The calculation is dependent upon the relative salaries of each parent. Agreements of support and custody necessitate change in order to accommodate the best interests of the child and adjust to the changing circumstances of their parents and their lives. This is why a non-dynamic custody agreement memorialized in a prenuptial agreement will rarely be enforced.