This answer is based on American English
When you are taking to a group of people and you wish to refer to a single object that each of them has, you can use the singular:
Raise your hand if you need a pencil.
If you say
Raise your hands...
you are likely to get some people raising both their hands, which is not the norm in such a situation. Of course if you want everybody to raise both their hands, as in an exercise class, then you would use hands.
With phone it is a bit different, especially when taking about the home phone, which it seems you are. To answer the phone is idiomatic in American English, at least. It is similar to answer the door. So you would very well instruct a group using
When you want to answer the phone...
just like
When you want to answer the door...
even if the house has more than one door, because presumably there is only one door that needs to be answered.
For a personal or cell phone you could also say
When you want to answer your phone...
This is true no matter how many phones each student has, whether zero, one or more than one.
Having said that, there are situations when you can use either the singular or plural when addressing a group. For instance a teacher can say
Take out your books and turn to page 144.
or
Take out your book and turn to page 144.
The former is possible, because the teacher is referring to more than one book, that is, to each one book that each student has, which adds up to the plural books.
The latter is also possible, because each student has only one book that needs to be turned to page 144.
In practice, probably the former is more common, except in situations when you want to stress one item (as in raise your hand).
As for stomachache, in my experience with American English, we would use the count noun, stomach ache, use the singular, and say something like
If you have a stomach ache, raise your hand.
But to use your phrasing, I would probably say
Do you all have stomach aches?
if I thought that each person in the group had a stomach ache or that most people in the group had a stomach ache.
I wouldn't say
Do you all have a stomach ache?
because that sounds as if I am asking the group if they have one, collective stomach ache.
And I wouldn't say
Do you all have stomachache?
because that sounds like a mass noun, with usage equivalent to
Do you all have cancer?