Upvote:4
The scriptures consistently portray marriage as the only valid vehicle of sexual expression:
Let marriage be held in honor among all, and let the marriage bed be undefiled, for God will judge the sexually immoral and adulterous. - Hebrews 13:4 ESV
(Also cf 1 Corinthians 6:9-20)
Although the scriptures are not explicit wtih regard to masturbation, many Protestant denominations would view it as inconsistent with teaching against lust (cf Matthew 5:27-30 - note particularly, the reference to the right hand in that context), but they are generally less dogmatic about that than say using prostitutes which is explicitly condemned (1 Corinthians 6:15-16).
Practical advice to widows and widowers is much the same as for singles:
Now concerning the matters about which you wrote: βIt is good for a man not to have sexual relations with a woman.β But because of the temptation to sexual immorality, each man should have his own wife and each woman her own husband. - 1 Corinthians 7:1-2 ESV
So if you can live chastely as a single do so (explicit encouaragement for this option is given if you have the 'gift' for it, but discouraged if you don't: 1 Corinthians 7:7-9), but if you have inclination and opportunity to re-marry, you are entirely free to do that instead.
also, and more specifically for young widows:
So I would have younger widows marry, bear children, manage their households, and give the adversary no occasion for slander. - 1 Timothy 5:14 ESV
Although the wider context of verses 3-16 shows several issues at play regarding this advice.