If you are skilled at applying sealant, you can do it; latex sealant will suffice, and it can be painted on. Alternatively, there are options like a slightly rounded quarter-round, a wooden strip that covers, or whatever you think fits and paint it with sealant. First, backfill with something, e.g., insulation, otherwise a lot of sealant may be needed when it's deep. There are also foam strips for filling.