When a person has become terminally ill and are now bedridden they will likely only live for 3 to 7 days.
However it can depend on what the person who's bedridden is ill with as my Grandma lived up to 3 months while being bedridden but I don't believe she had any terminal illness but just couldn't get out of bed.
So although most bedridden patients may die within a week of being bedridden some can live longer.