I feel for once I am somewhat qualified to give an answer here.
A bit of background to know where I am coming from and hopefully give some insight to my situation. I am currently finishing my second year in a MA Mathematics program and beginning my first year of my Ph.D. in Mathematics in the fall. I am married with two children(a 3 year old and an 8 month old). I had my first child during undergrad and my second child came two weeks before the current school year started. I attend a smaller department that is most certainly less intensive in regards to the expectations that another school would have(such as a top tier research university). I've been a Research Assistant for the past two years doing active and successful research with an amazing supervisor. This past year has been the most stressful since I decided to take three core year long sequences, which is a great deal of work to keep up with.
Above all, put your family first.
I would hope this goes without saying, but it can be easy to lose sight of this when you're up to your neck in homework/deadlines. When something comes up with my family, I drop my schoolwork to deal with it. I make it a point to always put my family before school. I'm sure there are professors out there who would argue otherwise, but I'm grateful that my professors seem to (hopefully) understand the situation and that I just can't put in the hours that other students can. I generally score lower on average than other students but I think I do fairly well. Could I do better? Absolutely...if I were to put in the hours and sacrifice time with my family I could score better on my tests and homework, but that isn't what really matters in the long term to me. Of course I want to do well in school(and I generally do!), but sometimes I have to make a choice and school gets the axe.
In the end, you choose your own priorities, and I would suggest opting for spending time with your family over finishing that HW. You just can't get those moments back.
Having a Strong Support System
I would absolutely not be able to do this without the support of my wife, family, and friends. Without my wife to help out with the kids and pick up some extra housework when studying for tests/finals/my oral MA exam, I would certainly have dropped out or (worse) ruined my marriage or become a terrible father. I make sure to try and do extra work whenever the stressful times pass and try to make it up to her as I can.
We are lucky to have family close that can help out with childcare and babysitting when I need to go in on an off day or want to stay late for a seminar. Without the support system we have in place, I'm not sure I could physically do it. If you have a similar support system, then it will be a huge relief to your stressed.
I should also mention that without some amazing people at my department, I wouldn't be able to succeed. Professors have been amazing with deadlines if the time just wasn't there for me some week. My RA supervisor has been absolutely amazing as well. She's extremely understanding with the kids and even being cool with me bringing the little one to meetings if everything just fell apart for that day. If I had a less understanding supervisor, I probably wouldn't have made it.
This is probably the trickiest part. Time management is always important, but it's extremely important to successful manage school and family. You just don't have all the time that other students do so when it's time to work you need to remove all distractions and get as much done as possible. I arrive at school between 8-9am and in between classes I work nonstop on homework or studying until I leave at 3-4pm. I have a computer in my office, but I purposely keep it off unless I absolutely need it on. I disable the wifi on my smartphone and removed nearly all the time wasting apps(facebook, games, etc..). I check my e-mail probably twice, once near the beginning of the day and once around the time I'm getting ready to leave for the day.
I do take small breaks from work to socialize with other students or check in with professors as needed, but I strive to make sure that I don't waste an hour doing absolutely nothing in someone else's office. Socializing is an important part of graduate school, so don't neglect it but don't let it consume all your precious time.
When I come home after school I shut off school mode. I spend the rest of the night with my family, eat dinner, and help get the kids into bed. Once the kids are in bed then I'm free to do homework. I don't always go straight into homework though because it's important to me to spend time with my wife relaxing and watching an episode or two of TV shows to wind down. It doesn't happen every night, but I usually make an effort to take it easy on weeknights when I don't have school the next day. The "school nights" I usually retire upstairs to work on homework. I'll work until midnight or later depending on how early I have to get up and I'll average around 6 hours of sleep. It's not great, but sacrifices have to be made somewhere.
Finally, in my opinion, give yourself the weekend. Once I leave school on Friday, I'm done with math until at least Sunday night. The weekends are prime family time and we spend every weekend visiting the zoo, science center, art museum, the park, or virtually anything else the kids would enjoy. I initially thought it would be impossible to take the entire weekend off schoolwork and still succeed, but I've been doing it for 2 years. This past year was the worst, but I stuck to it and I can safely say I managed to survive it and do just fine in my courses.
Dealing with Stress
Let's face it, you'll be stressed. Grad school is stressful as all hell to begin with, but then you go and toss kids into the mix? It's insanity, and you have to handle it somehow. I'm a fan of exercise, which takes up that precious time but is totally worth it. You have to feel as good as you can and any sort of activity is a great way to relieve stress. You could also do another hobby, or something that you do to relax. I'm also an avid reader, so losing myself into a book every now and then is great. The time I have to read varies, but it's one of my top hobbies. Find something you enjoy and do it frequently to relax.
Sometimes it just can't be helped. If you find yourself really freaking out, you really should seek out the school's counseling center. They are no doubt used to overworked students and having a place to lay all your problems on the table and have a trained therapist help you sort it out is probably exactly what you need.
To sum it up, I put my family before everything else. School takes a high priority but there are far more important things in my life than getting an A in every course. Schedule your time wisely, remove distractions, and work when it's time to work. Do something relaxing for yourself on a regular basis. Give your family the attention and time they deserve. You can't get those moments back and no letter grade in the world is worth that sacrifice.
Above all, make sure you are happy. It's such a small thing but I've seen students absolutely miserable hating what they are doing. Don't be that person! Life is too short to waste it being miserable. I suggest every 6 months or so, take a step back and evaluate how you feel about your situation(this should apply to anyone, not just graduate students). For instance, I vow to myself that if there ever comes a time when I begin to genuinely dislike what I'm doing, I will quit and find something else.
Good luck and don't forget what's really important. Grad school has a way of giving you tunnel vision and destroying you emotionally...just don't let it do it too often. :)