Can one of the B vitamins actually improve erectile dysfunction? The research makes a strong case that Niacin, a.k.a. Vitamin B3, does indeed do just that for a big percentage of men. Of course, this is a inexpensive help to erectile issues, as high niacin foods and supplements are cheap and readily available. Below I summarize the most prominent human evidence to date that shows which men will likely benefit and why:
1. Increased Blood Flow in Men with Lower Niacin Levels. Of course, there is a lot to an erection, but I think just about everyone would agree that the #1 goal is to increase something called endothelial function. The endothelium is the delicate lining of the arteries that pumps out nitric oxide and relaxes the arteries. And, of course, a relaxed, i.e. more open artery is one that allows more blood to flow into your arm, your leg or your brain. And I'm sure I don't need to explain why increased blood flow into your penile arteries is critical for erectile strength.
This is where a recent (2014) study of 127 healthy adults aged 48 to 77 shed some important light on vitamin B3 (niacin). This study calculated and compared dietary niacin intake for the participants and then looked at FMD (flow-mediated dilation), which is a clinical measure of blood flow.
In all subjects, brachial (upper arm) arterial FMD was positively correlated to dietary niacin intake, and dietary niacin intake remained a significant independent predictor of FMD. In subjects with above-average dietary niacin intake, FMD was 25% higher compared with the below-average dietary niacin group.
The researchers also emphasized that this niacin-induced increase in blood flow was independent of the standard nitric oxide-based relaxation of the arteries. What this means is that increasing niacin intake could synergistically improve your blood flow and erectile strength, making it another tool to add to your bedroom arsenal.
2. Less Oxidized LDL. In the above study niacin was also inversely related to levels of oxidized LDL.  Of course, oxidized LDL is the kind that really does the damage to your arteries and can build up plaque. Improving oxidized LDL is one of the goals of controlling arterial plaque as well.
3. Men With Bad Lipid Readings. One study examined men with both erectile dysfunction and "dyslipidemia." Dyslipidemia is medical speak for bad HDL, LDL, triglyceride or some combination of the three. They gave these men 1.5 grams of niacin, which is a megadosed amount, and is a favorite of Dr. Davis. (See my Review of Track Your Plaque for Dr. Davis' approach to plaque regression.) Besides the above listed benefits, niacin will also a) lower triglycerides, b) boost HDL, c) increase particle size and d) decrease LDL particle counts. All of these are very anti-atherosclerosis and great for your arteries.
The researchers noted that "when patients were stratified according to the baseline severity of ED, the patients with moderate and severe ED who received niacin showed a significant improvement in IIEF-Q3 scores (0.56 0.96 [P = 0.037] and 1.03 1.20 [P < 0.001], respectively) and IIEF-Q4 scores (0.56 1.03 [P = 0.048] and 0.84 1.05 [P < 0.001], respectively] compared with baseline values, but not for the placebo group...For patients not receiving statins treatment, there was a significant improvement in IIEF-Q3 scores (0.47 1.16 [P = 0.004]) for the niacin group, but not for the placebo group. Niacin alone can improve the erectile function in patients suffering from moderate to severe ED and dyslipidemia." 
NOTE: The IIEF is a standard questionnaire used by researchers wanting to evaluate erectile function and dysfunction, something that I discuss in my page (guest authored by senior poster Inigo): Understanding the IIEF.
These results are remarkable, because it appears that not only can niacin improve short term erectile function in many men, but also can likely help to reverse arterial plaque if a comprehensive program is undertaken. Of course, neither I nor anyone else knows how safe megadosed niacin is long term, but many experts consider it safe when used under the care of a knowledgeable physician. You'll have to do your own due diligence.
a) Some Vegetarians and Vegans. It should be pointed out that certain animal-based foods are known for being the highest providers of niacin. So does this mean that animal-emphasized diets will result in increased blood flow over vegetarians? My experience on the Peak Testosterone Forum has been the opposite and this is the subject of my book The Peak Erectile Strength Diet. Basically, a great many plant foods directly stimulate nitric oxide and will increase blood flow while lowering blood pressure. In fact, some plant foods can lower blood pressure as much as modern hypertension medications. See my page on Flaxseed and Blood Pressure for an example of that. High nitrate foods, such as spinach, arugula and beets, are yet another example.
In contrast, even moderate amounts of saturated fat in animal foods will lower nitric oxide and actually "stun" arteries. Researchers have searched for ways to overcome these artery-numbing effects of saturated fat and only exercise and certain nuts, such as walnuts, are powerful enough to overcome this clinical effect.
Futhermore, I have seen many times on the Forum where men have dropped their blood pressure dramatically going on a whole foods, mostly plant-based diet. One man with essential hypertension, which is nastiest kind, actually dropped his blood pressure by over 20 points switching to plant-based diet! 
That said, I think that guys like myself who eat a ton of plant foods have to be consider the fact that they may not always be getting all the niacin they could. Men with lower niacin status can probably give their erectile strength and cardiovascular health a nice boost by consuming more niacin-rich plant foods. There are many plant foods, such as broccoli and mushrooms that are quite high in niacin. I actually consume nutritional yeast and BPA-free sardines daily and get a nice amount of niacin this way on top of my regular diet. Therefore, I feel that I am likely maximizing my erectile strength by combining the best of both worlds, i.e. some NO-boosting plant foods and high niacin foods as well. (Both sardines and nutritional yeast also have a decent amount of protein as well, which is important to me since I enjoy lifting weights.)
b) Men With Digestive Disorders. There are many, many GI disorders that plague modern, urban dwellers: atrophic gastritis, Crohn's, diverticulitis, enzyme deficiencies, IBS, ulcerative colities and on and on. All of these can lower vitamin and mineral absoprtion. Men struggling with these issues may very well benefit from increased amounts of niacin in the diet or possibly with supplementation.
By the way, even though animal foods have higher levels of niacin, this can backfire: our intestines are narrow, convoluted and almost identical to that of an herbivore. We simply were never meant to digest a slow moving, low fiber, high fat animal carcas and many studies on gut flora and intestinal disorders are bearing this out.
c) Men with Poor Libid Readings Who Megadose. According to the above study, megadosing with niacin can be a big help for men with low HDL, high triglcyerides and/or high LDL. Keep in mind that this must be accompanied by lifestyle changes that focus on diet and exercise to really make it work.
1) J of Applied Physciology, Jan 15 2014, 116(2):156, "Vascular endothelial function and oxidative stress are related to dietary niacin intake among healthy middle-aged and older adults"
3) J Sex Med 2011 Oct, 8(10):2883-93, "Effect of niacin on erectile function in men suffering erectile dysfunction and dyslipidemia"