The market isn't officially in bull territory, but recent gains have investors excited that one could be near. Whether it happens in 2023 or thereafter, a bull market is inevitable. That means investors should take advantage of lingering low prices on strong dividend stocks before prices go back up.

Dividend stocks are especially great buys in a down market because pricing and yield work inversely: the more beaten up the share price, the greater the yield. But it won't stay that way for long. When stock prices recover, yields drop and investors wish they had locked in higher yields before prices went up.

Two dividend stocks investors should load up on while they are still trading at a discount are Realty Income (O -2.47%) and Prologis (PLD -1.25%).

Realty Income: The net-lease REIT giant

Realty Income is arguably one of the best dividend real estate investment trusts (REITs) in the market today. Dubbed the "monthly dividend paying stock", Realty Income has increased its dividend payouts 25 years in a row, paying a dividend for 628 months in its 53-year tenure.

The net-lease REIT owns and operates over 11,700 properties, leasing them on long-term net leases. Its properties are mostly retail focused and leased to tenants in the grocery, convenience, dollar, and convenience store industries along with several others. It also has a growing portfolio of non-retail-focused properties, including industrial real estate and even a casino.

The last few years have been massive for the company in terms of growth. The REIT spent $17 billion on new acquisitions, more than doubling its portfolio since 2019. It now owns property in the U.S., the U.K., Spain, and Puerto Rico. Even with its absolutely massive portfolio of properties, the company has still achieved a nearly 99% occupancy rate in its third quarter of 2022.

Net-lease real estate is a very consistent and reliable business that has proven its resiliency through up and down markets. Its latest Q3 earnings saw its core metric funds from operations (FFO) grow at a clip of 9% compared to the year prior.

The REIT isn't down as much as some of its other REIT peers -- just 11% off from its recent high. Demand for high-quality, reliable dividend stocks like Realty Income peaked during the 2022 bear market, which helped the stock avoid major losses. However, it's still well priced today, trading around 16 times its FFO of its full-year outlooks. Right now, this monthly-paying dividend REIT offers a yield of 4.6%, which is nearly 3 times more than the average of the S&P 500.

Prologis: The premier play for industrial real estate

It's not often a top-tier operator like Prologis goes on sale. Yet the stock, which holds the title as the largest REIT by market capitalization and the largest industrial operator in the world, is down 27% from last year's high. At the start of 2023, Prologis owned, or had an interest in, roughly 5,500 industrial buildings in countries around the globe.

Concern over waning demand for industrial real estate in a slowing economy on top of rising interest rates led to a sell-off of the company last year. Despite investors' pessimistic outlook on the industry, its most recent full-year earnings reveal its business is booming. The full year 2022 was one of its strongest on record, with its FFO rising by 24% and its net-effective rent growing by 50% since last year. Its occupancy has risen to 98% -- its highest occupancy level in over 3 years.

Its strong performance as of late is thanks to high demand and limited supply for the warehouses, manufacturing facilities, last-mile logistics centers, and distribution centers that Prologis owns and leases. This unprecedented demand won't last forever. But even when demand returns to more normalized levels, Prologis should still be able to drive healthy growth in its net-operating income thanks to renewing leases. The company predicts even with zero rent growth from today's rate, it should see an 8% to 10% increase in its rental income.

Its track record of raising dividends may not be as long as Realty Income's, but it's still noteworthy. Prologis has raised its payout for the last 8 years in a row and has plenty of coverage for its 2.5% yield.

Attractive yields aren't the only reason to lock in these stocks while prices are discounted. These dividend stocks can be a tremendous way to sustain a market downturn because of the reliable passive income they pay, despite what the market is doing. That's why investors should capitalize on what the market is doing today before these deals are gone for good.