Consumer activist Ralph Nader, angered by the Reagan administration's attack on some federal regulations, has sent Office of Management and Budget Director David A. Stockman a 211-page report asserting that regulations of five government agencies were worth $5.7 billion to the economy in 1978, providing $37.1 billion in benefits while costing $31.4 billion.

In a cover letter, Nader challenged Stockman to leave "your air-conditioned office" and view insurance company films of auto accidents, drive through polluted areas of West Virginia, spend a day in a South Carolina cotton mill or with black-lung victims in West Virginia to "open your eyes and quicken your conscience."

A spokesman for Stockman said the budget director had no comment on the letter or the report.

Writing in the preface to the second edition of "Business War on the Law," by Mark Green and Norman Waitzman, Nader charges that "the failure to regulate -- to require business to internalize the full cost of its external damage -- is nothing less than a very costly subsidy by present and future generations."

The authors challenge the estimate of Murray Weidenbaum, President Reagan's top economic adviser, that government regulation costs $100 billion annually -- a figure they call "ideological arithmetic."

At the same time, they present their calculations of the economic benefits of the rules of five agencies: the Occupational Safety and Health Administration, the Environmental Protection Agency, the National Highway Traffic Safety Administration, the Food and Drug Administration and the Consumer Product Safety Commission.

Their benefit calculations for 1978:

OSHA -- $6.4 billion in worker productivity; 350 lives saved and thousands of disabling accidents prevented.

EPA -- $23.3 billion, largely from air pollution controls. One 1977 estimate said pollution controls could save 125,000 lives annually.

NHTSA -- $6 billion; 12,580 lives saved and thousands of injuries avoided.

FDA -- $1.4 billion, including savings from limiting the proliferation of unnecessary or ineffective drugs.

CPSC -- No figure given, but the report cited a 230,000 reduction in the number of emergency room poisoning admissions, a reduction it attributed to a CPSC rule on child-proof caps. It also asserted that crib standards prevented 84 annual infant strangulation deaths since 1974.