Recent research in the last few years  suggests that a large component of DOMS is not from damage to the muscle fibres (as is commonly thought), but more from an over-activation of your central nervous system (CNS) when it is not used to so much activity. It basically gets upset at you for making it do so much more work than usual.
Why do we get DOMS?
I suspect that this may be an evolutionary adaptation that functions to prevent us doing more physical work than we can physically handle. If true, it would prevent us from injuring ourselves through over-exertion by holding us back from continuing the same work over subsequent days.
Thus, you wake up the next day sore, and this prevents you from continuing to do work for which you haven’t trained or adapted.
This is why we need to train our nervous system (coordination / form / functional training) just as much as we need to train our power or strength!
Eccentric contractions (where your muscles are lengthening as they contract, such as when lowering a weight slowly) is known to be more likely to bring on DOMS, but according to these new studies that’s because an eccentric contraction requires far more neural activity.
↑Neural activity = ↑DOMS!
Get these habits
Extrapolating from this, I believe that foam rolling (or getting a massage!) can help to regulate CNS perception of pain. By providing gentle stimulus to the aggravated tissues, the CNS would process the incoming sensory information against its perception of pain, and adjust its perception accordingly (i.e. down-regulate it).
So, getting a massage or doing some foam rolling within 24 hours of a heavy workout will likely lessen the pain of DOMS.
Similarly, having a hot or cold shower, or a bath, or (ideally) jumping between the two (“contrast therapy”) can stimulate your nervous system in calming ways that may significantly reduce your DOMS.
Same with sleep. I believe that sleep helps the CNS integrate perception with experience, and would allow the brain to process how much actual damage there is, in comparison with how it perceives the pain, and regulate your perception accordingly. While we are conscious and concentrating on life around us, the brain is too occupied to be able to do this.
Supplements that might help
This being the case, I further believe that MAGNESIUM is also an essential supplement. Besides most people being low in Mg anyway (mainly due to poor diet), Mg helps with nerve signalling. When adequate magnesium and calcium are present, nerve signalling is well-regulated.
And, while some studies are inconclusive at low doses, and others are conclusive in higher doses, I support the opinion that fish oil is generally beneficial. 
Since starting a regimen of daily fish oil and magnesium amino acid chelate, my DOMS doesn’t usually last more than a day at most and is much easier to deal with than previously. (Of course, your mileage may vary…!)
A word on medications
One final word: while you can take ibuprofen or paracetamol to dull the effects of DOMS, I don’t recommend them. Even the makers of ibuprofen tell you to take the minimum required dose, for the minimum required time. This is because it puts a load on your liver and kidneys to break down and process these drugs. You’re much better off drinking plenty of water, having a hot bath or shower, hitting the foam roller and getting a good night’s sleep.
Here again are the takeaways for maximum muscle health and minimum muscle soreness:
- Take magnesium amino acid chelate supplements. I recommend 200–500mg per day, split across three meals, or following specialist advice.
- Take high-quality fish oil daily. Ask a specialist about which brands are reliable. I recommend 4000–6000mg daily or following specialist advice.
- Have a hot and/or cold shower or bath within six hours of your workouts.
- Get 8 hours of sleep and go to sleep at the same time every evening for the best possible results.
- If you suffer from DOMS regularly, invest in a foam roller and use it within 6 hours of a workout; and/or, get a remedial massage from a well-trained therapist. Ask your therapist how they would treat you for DOMS. If they respond by saying “huh? What’s DOMS?” then look for another therapist!
 Hiroki Ota (n.d.). TRPV1 and TRPV4 Play Pivotal Roles in Delayed Onset Muscle Soreness. Journals.plos.org. Retrieved from http://journals.plos.org/plosone/article?id=10.1371/journal.pone.0065751
 Katharina Zimmermann (n.d.). Central Projection of Pain Arising from Delayed Onset Muscle Soreness (DOMS) in Human Subjects. Journals.plos.org. Retrieved from http://journals.plos.org/plosone/article?id=10.1371/journal.pone.0047230
 Sandra Ketcham (2 Apr. 2015.). How to Correct Your Calcium-to-Magnesium Ratio. LIVESTRONG.COM. Retrieved from http://www.livestrong.com/article/447639-how-to-correct-your-calcium-to-magnesium-ratio
 Studies related to Muscle Soreness and Fish Oil. Examine.com. Retrieved from https://examine.com/rubric/effects/view/2/Muscle+Soreness/all
 Grant M. Tinsley (n.d.). Effects of Fish Oil Supplementation on Post-resistance Exercise Muscle Soreness: Journal of Dietary Supplements: Vol 14, No 1. Tandfonline.com. Retrieved from http://www.tandfonline.com/doi/abs/10.1080/19390211.2016.1205701