It's very common for babies to get a bottle of formula, then crash out, and sleep well thus making a mum really worry about her milk supply/whether they're getting enough.
Yet - FF babies don't sleep better than BF babies (taken as a group). Some will, some won't.
But sometimes stocking a baby up with formula will get them to sleep longer. But consider what they're doing - if BFing is the biological norm and their sleeping patterns when BF are therefore that baby's individual normal pattern (hard as that may be), filling up with formula is interfering with that natural pattern.
Does this matter?
Maybe. Formula is harder to digest (I know you know this, but I'm writing it all out because who knows who is reading it) and takes longer to get through a baby's system. This can lead to a longer, deeper sleep for a baby who isn't naturally made to do this and this is a known SIDS risk. (Compare this with the fact that SIDS is exceptionally rare so nothing to panic over per se).
But what you are doing is interfering with what is natural for that baby (by tanking them every night) and no one knows what the ongoing risks of that are (aside from the known risks of using formula).
Kellymom as always explains it well:
www.kellymom.com/nutrition/solids/solids-sleep.html
I'm not sure exactly where you need reassurance. Was it ok to give formula? Yes, of course, your baby would have been distressed and in pain without it. Will it have harmed him? As a one-off? If he's no dairy allergy (which would have shown up?) No. Over the next week or two his gut will be re-lined with your milk so in theory over the next little while he'll be marginally more prone to infections but realistically as you BF this will sweep stuff out.
Are you worried that he's not sleeping well because he's not getting enough milk from you? Nahh, he's growing fine (I assume), all the usual things. He's just not a good sleeper.
However, if you do get desperate for sleep then you've got the option of doing this again if you want to. The choice is always yours. You know the pros and cons and we all know that sleep deprivation is utterly, utterly appalling and potentially dangerous if you're driving, etc.
Glad your mum is ok. That must have been a terrible shock :(