Magic fountains were in the DMG. It didn't say what the fountain would do, but the tricks appendix did include a secret door to them.
In my experience, most DMs I played with had magical fountains in the adventures they created that did various things, including some that raised and/or lowered stats.
There were magic pools detailed in the DMG (Table VIII C. Magic Pools, page 172) that could raise or lower stats.
TABLE VIII. C.: MAGIC POOLS* (d20)
Die Result
1-8 Turns gold to platinum (1-11) or lead (12-20), one time only.
9-15 Will, on a one-time only basis, add (1-3) or subtract (4-6) from one characteristic of all who stand within it:
1 = strength 4 = dexterity
2 = intelligence 5 = constitution
3 = wisdom 6 = charisma
(add or subtract from 1-3 points, checking for each character as to addition or subtraction, characteristic, and amount).
16-17 Talking pool which will grant 1 wish to characters of its alignment and damage others from 1-20 points. Wish can be withheld for up to 1 day. Pool’s alignment is: lawful good 1-6, lawful evil 7-9, chaotic good 10-12, chaotic evil 13-17, neutral 18-20.
18-20 Transporter pool: 1-7, back to surface; 8-12, elsewhere on level; 13-16, 1 level down; 17-20, 100 miles away for outdoor adventure.
* In order to find out what they are, characters must enter the magic pools.
As a DM I used one in my long term 1e campaign. As players tried it out and rolled the dice I instructed and got stat boosts one player was figuring out the mechanics as it happened and figured out that one die was for stats, one die was for how much and that it was a 1-3 random adjustment to a stat. So when his 18 percentile strength ranger went up to the pool and figured out his rolls were for strength and for +3 he was super excited about going to giant strength like the wild elf assassin had, he just could not figure out what the last die was for, then found out that the three previous players had all rolled an increase whereas his came out a decrease and he went down to a 15 strength.
50/50 shot at increase or decrease is a way for someone in a group to get great stats if they all jump in, but it is a huge risk for any individual character and knowing it is 50/50 good or bad can lead a lot to not try their luck.