Op, sadly you’ve taken a crap situation for yourself and now turned it into a martyrdom
yep, you were upset. Fair enough. It was dwelling on your mind, fair enough, sleeping was difficult due to that and other stuff. Fair enough.
at that point you should have got up, taken yourself somewhere else for an hour and distracted yourself deliberately to take your mind to a relaxed state ready for sleep. Ideally this would have been form listening to music, reading a book or watching TV. sometimes, you really can’t make a crappy situation any better in the here and now. And sleep is actually really important to get a sense of perspective and begin to process emotions. Your boyfriend was right in saying there was nothing useful to be done in middle of night, including talking about it. I’m 60 now, and have long since learnt that in these situation and other stressful situations, sleep has to be protected, and that you have to often FORCE yourself to become distracted- almost batting away the thoughts and emotions that are so distressing, until you’re in a better place to mamange them and process them
your boyfriends reaction was that of someone who was tired, irritable and is relatively normal. Nothing worse than being forced to stay awake- you were effectively trying to use him as, at best, your emotional sponge , and at worse, your emotional punchbag. all you’ve resulted in doing is to max him sleep deprived too, which means he’ll be less able to help you process your own emotions the next day.
to put it bluntly, you didn’t behave with emotional maturity. Try to realise others are not responsible for your emotions. They can’t take those emotions away from you. They can’t wave magic wands to make you feel better. Only YOU can do that. That can take a lot of time, depending on what the news was, and that’s fine (read grief pathway stuff if it’s a loss). But please learn the valuable lesson that trying to make someone else responsible for fixing your emotions, or, god forbid, making them responsible for your emotions, is never, ever, actually going to help you.