Boyfriend issues

I work the night shift and go to school. He stays in st.cloud and goes to schools. He comes home on the weekends. I had Yesterday off so I tried to stay up all day to sleep at night. I ended up falling asleep for a few hours. My boyfriend ask if I was planning to sleep all night or stay up cause he has school stuff to do. I told him I am going to try to sleep all night. He said ok I have homework to do all day in the morning. So we turned a movie on at 12am and fell asleep on the couch. I woke up at 3:30am and could not fall back asleep so I went to the bedroom and still couldn’t fall asleep. 7am rolls around I took are dog out. He was still asleep so I laid back down. I fell asleep and didn’t wake up till 1pm. When I got up at 1pm he had his school stuff packed and was walking out the door. I asked if he was leaving he said yes that he needed to get school work done and I was sleeping when I knew he had stuff to do. I told him he could have been doing it. He said not everything is his fault which it is not. It takes two people in a relationship. I told him this and he just walked out the door and left for st.cloud. Did not even let me explain what happened. He knows I work the night shift and I have a hard time sleeping because of everything going on in our life’s and I have always encouraged him to get his school stuff done.