This will not be an easy conversation to have with the boys, but it is necessary so you can help them deal with their mother's addiction and how it affects them and the whole family. It's clear from your question that you care deeply about them and want to be an important source of support.
These children have likely experienced a lot of confusion and trauma as a result of their mother's addiction. That's why it's important to help them understand what is happening and to encourage them to talk to you when they're ready.
This discussion should occur when things are very calm and there are no distractions. Using language that is appropriate for each of their ages and developmental levels, let the boys know their mother is struggling with an illness in which she is using drugs and is having a difficult time stopping. Tell them that like anyone who is sick, she needs medical help and it may take a long time for her to get better. That means they might not be able to see her for a while. Also, tell them you love them and explain that you will take care of them, keep them safe and make sure they have everything they need while their mom is away. To address any fear, concern or confusion they may feel, help them understand that things will remain the same for them and that they'll continue to go to school, see their friends and follow the same rules that have always been in place.
Provide this information to the boys as simply as you can, and try to end the conversation with statements of hope for their mother and support and comfort for them.
Since you are talking to the boys about addiction, you also may want to educate yourself about the topic so you can answer questions they may have (and possibly answer questions you have).
While you are doing your best to support the kids, also remember that this situation is putting a lot of stress on you. It is important to take care of yourselves, both physically and emotionally, and depend on each other for strength and guidance moving forward.