I agree with anongoodnurse, but want to add some additional advice. It's mostly about other options to gather more information on what the root of the problem could be.
So he is struggling with math and takes very long to complete his homework.
1) Talk to his classmates' parents
You mention in your edit, that you talked to his teacher and he receives help. However, one possible problem might be that the math assignments are actually too hard. To find out how others do (and maybe struggle, too), it's good to also ask some other parents. Maybe it's a general problem that not only your son faces.
2) Rule out "structural" problems
There are several possible reasons why he may struggle with his math homework:
2.1) Does he know how to learn math? Does he learn it properly? Even learning needs to be learned. Things to consider are
- Practice: Does he practice enough, especially basic concepts? In my experience, this is very important, because this way I understood it best. As they are basic, they are easier (boosting self-esteem) and needed for the higher concepts (if you are missing them, you will surely struggle and take too much time). You could ask teachers or parents for resources / math tasks or search the Internet.
- Approach: How does he approach his homework? If he tries to solve it the wrong way or believes that it's more complicated than it actually is, it's easy to waste so much time. He may also approach it in the wrong order.
- Basics: Does he know everything he needs to solve the math tasks? If not, does he have / know the necessary resources and uses (knows how to use) them properly? One step after another.
I'm not a parent myself, so take the following advice with a grain of salt, but from your decription, considering the impact this has on his health - I suggest you try to decrease the pressure put on him (I guess mostly by himself?). Maybe set him limits. Else, not only will his health suffer even more, it's also like a vicious cycle: if he is sleep-deprived and demoralized, all of the math tasks will be even harder for him to solve and take more time and increase the suffering...
Maybe that's something to discuss with his teacher, they can likely give you advice on what among the math tasks is most important and sensible steps on how to learn them. Perhaps, they can help develop some kind of schedule for him to follow to build up the necessary knowledge.
Maybe, in order to find out more about the "structural" issues I mentioned (and perhaps rule them out), it could be helpful to observe him while he does his homework. Maybe not too obvious, but when you try to do it together, let him start and go about it first and then see how he tackles the problem. This information might also be useful to the teacher.