Decide what your budget is and stick to it. Considerations include how long you think the child will use the mattress, whether another child will use it as a hand-me-down, whether it will be converted to a guest mattress down the road or whether the child will take it to her first apartment. The longer you expect to use the mattress, the better quality one you might need, which sometimes entails more expense.
Listen to the salesperson, but understand her job is to get you to pay for the most expensive mattress she can talk you into. A coil mattress will last longer than an inexpensive foam one, but if you are on a tight budget and the child uses it for only a few days a month when he visits, that is not an issue.
Consider a more expensive crib mattress that can be converted to a child's mattress in a different frame. This often sees the child through age 5 or 6 before needing replacing.
Measure the amount of room you have and select between a twin or full-size mattress for an older child. Twins take up much less space, but make it harder to have sleepovers. A full mattress, or even a larger one, allows a child to enjoy her friends coming over to visit.
Discuss with an older child to find out his wishes. Buying a mattress that a child is unhappy with will cause discontent every time he goes to sleep on it.