For some reason, a lot of people are interested in making their own Lionel train track. I don’t think it’s practical, but it’s definitely possible.
I found a 1944 Popular Mechanics article on making your own DIY Lionel train track. During World War II, toy production all but stopped, so short of buying from stores like Madison Hardware that sold old stock, making your own was all you could do. Even Madison Hardware had to resort to creativity, building a machine to straighten curved track sections to make straights so they would have straight track to sell.
The article used scrap tin salvaged from cans, wire salvaged from a coat hanger, and a homemade jig made of flat steel bar and wood. It was possible to make both straight and curved sections, although the article didn’t elaborate a lot on making curves.
I don’t think it’s practical, at least not today, when clean used O27 or O31 tubular track sells for $1 or less per section and most dealers take in used track faster than they can resell it. The jig will cost more to make than a circle of track costs, and then there’s the trouble of locating suitable metal sheet to use, which is likely to cost more than the track as well. Then there’s the time involved with cutting the metal, forming the rails, and assembling the track. It’s something to do because you really want homemade train track, not to save money.
But I do think the article is interesting from a historical perspective. If you found some track in a stash of 1940s trains that appears to have been homemade, there’s a pretty good chance the person who made it found the instructions in Popular Mechanics. And there’s a pretty good chance whoever made it didn’t have any other source for track at the time.